Good question! Can't speak for Vista or Mac users - think Mac's in particular do this better than Windows hardware with "low end" soundcards. Also, the answer will very much depend on your sound card - many (most?) mid-range and high end cards have an option to play and record (digitize or re-digitize) music at the same time, plus specialzed software to control the process.
Assuming you only have Sound Recorder and a low end sound card, however, there is no way (or at least none that I know
) to play and record digital music at the same time. What I usually do is record on separate hardware (either a digital recorder or, more often, my video camera). That will give you a digitized audio file which you can load back into your computer and play and edit in Sound Recorder. For best quality, bypass your mike (it's frequency response is generally optimized for voice, not music) and go directly from the headphone output of your computer into the recording hardware - this may require two or three passes to get the recording levels correct but generally gives pretty good results. If you want even better (i.e., professional level) results, you'll probably need to upgrade your sound card hardware.
You can also go from a sound source (say an iPod) in through your mike input to Sound Recorder. This will require some setup using Control Panel and you still have the level adjustment problem - and some microphones just don't seem to have enough output to work very well. Haven't done this enough to make specific recommendations.
Finally, note that Sound Recorder will only work with .wav files but it does let you change recording parameters (sample rate, number of bits, mono vs. stereo, etc.).