Capturing through the line-in using Audacity is fine, although it won't be time-locked to any video so if your goal is to have the audio synced to a video source then it'd be better to use VirtualDub and capture the video at the same time.
Obviously, make sure to set your levels correctly so you don't get clipped peaks.
There are probably better ways, though. If you're using the built-in audio on your motherboard, quality may be affected by EMR interference/noise, timing issues in the drivers/software (I had one device that worked fine at 41.1kHz, but introduced a metallic sound when I tried capturing at 48kHz). I've also heard people say that Realtek chipsets are generally cheap & nasty, which is probably why AntcuFaalb was asking (check the chipset in device manager).
Dedicated sound cards are less likely to suffer from these problems, especially the high-end ones.
But if you're really serious about getting the best quality possible, then you'd need to look at professional recording kit (e.g. Apogee Duet).