So, you ask, why would you want to record your sound card's output? There are many reasons. The main reason I use this technique is to record the output of music programs like ReBirth and SimSynth, where the demo version doesn't allow one to save any files. Another use is to get around copy protection on downloaded music or sound files.
This is the method for recording your sound card's output under Windows. Unfortunately, I don't run either Linux, MacOS or any other operating systems - perhaps someone who does can add to this node.
The first thing to do is to open up the Windows Mixer. Look for a little speaker icon in the system tray. If it's not there, go into Control Panel, and depending on your version of Windows, open the Multimedia or Sounds and Audio Devices control panel. Check the "Place volume icon in the taskbar" checkbox, and hit OK.
Once you have your volume icon, double-click on it. This brings up the Playback Control mixer. From here, you can adjust the volume for each individual sound source on the system - wave or DirectSound output, MIDI, CD Audio, Microphone, Line In and so on. However, the option we're looking for isn't here.
Click on the Options menu, and select Properties. Click the Recording radio button. Now, look further down the dialog box, and you should see a list of items with checkboxes next to each one. Make sure the "What U Hear" or "Mixer Output" (or, if you can't find either of those, anything with the words 'soundcard', 'mixer', 'loopback' or 'output' in it) checkbox is checked.
Click OK. You should now see a similar-looking but subtly different Record Control mixer. From here you can adjust the gain of each recording input*, and select which input you want to record from. You want to record what's coming out of your sound card, so select the "What U Hear" or "Mixer Output" (or whatever) checkbox.
Now, start up your favourite audio software and hit Record. Press Play on whatever source you want to record from. Wait until it's finished, then stop recording. Edit the resulting sound file as required and save it.
There are a couple of interesting things one can do with this. For instance, if you don't have any multitrack software, you can use this technique to overdub several audio tracks on top of each other. Plug in a mic or guitar or whatever you're recording, hit record, play your backing track and play over the top of it. Et voila - an overdub. The problem with this is once you've overdubbed something, you can't edit it without recording everything again.
You can also use this in conjunction with, for instance, MSN Messenger's voice messenging. Set up a voice conference and start playing some music or sound files, and the person on the other end will hear what you're playing.
*Note that the gain of the input that you set in the Recording Control mixer is not the same as the volume that you set in the Play Control mixer. Gain controls the loudness of the signal going to any programs recording that input, while volume just controls how loud the signal appears in your headphones or speakers.