Mystic is right. Extracting the music is very easy; just open a wad editor like XWE and open the file music.dta in it. I use this myself just so I have copies of the OGG's in my hard drive to listen to.
The music itself, however, cannot be used anywhere else. It's all copyrighted by us and we're not allowing anyone else to use our music in their games/movies/etc. at this time. Well, it's mostly copyrighted by us; the title screen, Robotnik's theme, character select, speed sneakers, invincibility, act finished, and special stage are the exceptions, because they have snippets of a copyrighted Sega tune in them ("Sonic and Knuckles" theme from the Virtual Sonic CD), but we still partially own them, and like the rest of the music, no-one can use those either.
Sorry.