There are a number of ways to do this, but none of them are really great. The main way it is done is recording the audio output, and not directly from within the application.
Rogue Amoeba makes great audio products that you can use to record sounds coming through your system. Ambrosia Software makes the free WireTap software, available
here. One problem you might have is that the software doesn't put in breaks between songs. At least one software can, but I can't remember its name. Sorry. For making track divisions, you can use a sound editor like
Sound Studio. Perhaps you can do it with QuickTime, but this might only be Pro or not at all. I'm sure you could find a use for BlackCat System's
Audiocorder Much of this software isn't free, but if you want to do a good job, expect to pay some money. After all, you are getting a useful piece of audio software that can be used for other things.
Edit- Now that I've said all that, you might find skipping over what I just wrote and going straight to
http://radio.about.com/cs/recordingformac/ helpful.