Are you looking for...
Recording from the "Stereo Mix" input
"Record what you hear" is a function of the sound card and its drivers. The recording software is completely dependent on the presence (or absence) of this feature. For example on this Dell laptop, one of the selections for recording input is "Stereo Mix". Sound cards from Creative Labs use the "What U Hear" name for this feature.
Combine this with i-Sound WMA MP3 Recorder and you can record anything you're able to hear on your PC. Great for recording game soundtracks. And it's a simple solution for bypassing whatever consumer-hostile DRM crap the rest of your computer tries to foist on you. Stereo Mix feature also used for capture streaming audio, mixing sounds in real time and in MIDI to MP3 converter.
Some recording software adds this feature by wedging an intermediate sound-card driver between the computer and the sound card, but you will have compatibility issues with many audio-related software, especially with Windows Vista.