KnowsNothing, there are several different methods that produce varying results.
1) The first way is probably the best way, and I believe is the way that most OSTs are made. In some cases, this method will exceed the quality of the OST if the developer is lazy. (Square) What you do is get the soundtrack for the game in a custom format for the system of the game you want to rip. (NES = NSF, SNES = SPC, PSX = PSF, PS2 = PSF2, Genesis = GYM, etc.) Popular game soundtracks can be found in various places that I hesitate to mention, but if you tell me what games you want, I can probably find links for you. This option is not available for all games though, and N64 games haven't yet developed this ability. It's still pretty new on PSX and PS2 as well, so only a few games have the soundtracks ripped in this fashion. Anyways, once you have the sound clip playing in winamp, you can use the output to file option to record to wave files of whatever quality you like. These can be burned on a CD in professional quality, giving you a nearly perfect replication of the original music.
2. The second way is simply to plug your console's audio out into your computer's line-in port, open up the Windows Sound Recorder, and hit record. This will usually give you an analog recording (depending on your hardware), and the quality likely isn't the best, but it's definately passable, and almost at the regular MP3 quality. The trick is getting to a place where the music plays and nothing else does. Once you have WAV files of all the music you want, throw in a blank CD and burn away. I have several tracks of Eternal Darkness music created in this way.
3. The last way is to get MP3s from, or buy the official OST. Sometimes, such as the case of Eternal Darkness or Killer Instinct, the developers will include extras on the CD that make it very worth your while. Given that the tracks are in MP3 format if downloaded, and not a WAV, the quality will usually be lacking, but it's definately passable. The official CDs are well worth your money if you have the money. Sometimes, the developers will even include a soundtrack CD with the game, as is the case with Killer Instinct, and Silent Hill 3.
EDIT: Just thought I would mention that most of the VG tracks in my playlist that you see are created by means of option #1.