Check out http://audacity.sourceforge.net/

It is an open source audio editing program, and you can set it to record.

Make sure to go into Windows Sound Settings or whatever and under Recording Options select Line In, or Mic In, depending on which one you want to use. Line In is usually a Stereo port, while Mic In is usually Mono. Mic In goes through a lot of amplification, so if you're recording through it, watch the display area and make sure it doesn't start clipping during the record.

Have fun,

-Tim_axe