This question turns up a lot here, due to the fact that a the standard soundchips or cards in many PCs have limited features. As such, Audacity can only offer the options provided by your audio device’s driver. You can look for updated drivers, or you can physically loop the audio from Line Out to Line In (although that can introduce its own problems). Failing those options, upgrading to a fully-featured internal or external soundcard is the next move.
This problem is most common in laptops. Several manufacturers produced laptops with the record inputs crippled, but due to complaints many have now got updated drivers to correct the problem. If you have a laptop with this problem, it’s definitely worth checking if a driver update can fix it.