"Record what you hear" is a function of the sound card and its drivers. The recording software depends entirely on the presence (or absence) of this feature. For example, on this screenshot from a Dell laptop, one of the input choices for recording is "Stereo Mix". Creative Labs sound cards use "What U Hear" for this feature.
By itself, the "Stereo Mix" input mixes all sounds coming through the sound card. This implies the need to turn off everything superfluous before recording. At the same time, it allows combining recordings with background music without using additional software.
"Stereo Mix" combined with the i-Sound Recorder allows you to record anything you hear on your computer. Most often this simple solution is used to bypass the unfriendly DRM protection that the music industry tries to impose on you. For gamers, it is an essential solution for recording computer game soundtracks. The "Stereo Mix" feature is also used to capture streaming audio, mix sounds in real time, and to convert MIDI to MP3.
Some recording software adds this feature by installing an intermediate driver between the operating system and the sound card. This is not the smartest solution, because it creates compatibility problems with many programs that work with audio, especially on Windows Vista.