Weather or not this feature exists is basically up to the hardware and driver
. You still need software to do the recording which as carwiz said, Audacity would be good for. But not all sound cards (and mostly built in sound cards) support this feature.
You may have to look into getting a better sound card to enable this functionality. :/ Though I don't know which ones do or don't support it other than any quality sound production card should (Like something from MAudio). I have a Delta44 and it definitely does.
If Audacity doesn't have a record mixer or record monitor (or even "record monitor mixer") open enabled on your machine then your card/driver may just not support the option (Though the feedback though mic or line-in /may/ still work, in a lot of hardware, that is purposely not supported)