If it's a dvd, you can rip it with Smart Ripper. Then you can use DVD2AVI to extract the video/sound tracks (I think you can extract directly to MP3 - If not you can convert the extracted .wav file(s) to MP3).
If it's an Audio CD, you can rip/convert the .cda files with MusicMatch Jukebox.
There's a ton of programs available for ripping Audio CD's... I'm familiar with MusicMatch Jukebox myself.
Go here. On the left there's a link in the green section 'DVD Rip'> on the next page click on the very top 'Sefy's' guide. The only programs you'll need are Smart Ripper and DVD2AVI, the links are provided at the top of the guide. As soon as you get to 1h in the guide you've gone far enough... you should have your mp3 (or .wav) by then.
Also check here its got just about every DVD Ripping and DivX tool availible. Check it out, there will be one. Personally I would use DVDx v1.5 or higher tell it to make an AVI with a separate Audio stream then delete the video stream and convert the Audio to MP3, you might also want to chop it up a bit to give you tracks.