There are various ways to do it...the USB turntables that have recently come available certainly do the job, but if you're fussy about audio quality they can fall short. They use cheap ceramic cartridge pickups as opposed to the magnetic pickups on a better turntable.
So if you already have a good turntable, there are a number of USB devices that provide a means to connect your existing turntable to your 'puter via USB and these will generally sound much better than the inexpensive USB turntables that have cropped up.
But, again, if you're not terribly fussy about high end audio and you don't already own a turntable, the "USB ready" turntables may be good enough.
You'll still need a software program for the capture, and Audacity is a good cross platform program for doing this, and works very well. If you happen to be on a Mac, you can just use Quicktime (which comes with the OS) to do a simple capture.