How do I extract the music from the game files?
Blizzard games typically store all the data in mpq file(s), and StarCraft 2 is no exception. I believe the music files are stored there as well, though I don't know in which format. There are a few tools around for opening the mpq files - here's an example editor. Keep in mind that if you do find some way to extract the music from the game and transcode it to some convenient format, I'm guessing sharing it could be considered a copyright violation; and I wouldn't be surprised if just extracting any data from it is against some Blizzard policy.
You don't actually have to manually extract the music, however - the StarCraft 2 collector's edition includes a soundtrack CD, which you can also buy independently (here's one offered in Amazon, and Ivo posted a link to iTunes where it's much cheaper).
In addition, you might be interested in this post on GosuGamers, which points to a series of YouTube videos with the different tracks.
There's a soundtrack you can buy ;-)
Here's an iTunes link
I did use the windows MPQ Editor to extract the jukebox music, which is in ogg format. I'm running this under Macosx with WineBottler.
Gotta love Zerg, Shotgun, and you. By the way, Whiteboy James and the Blues Express have a faster version. Somehow I still prefer the jukebox version.