You need some way of getting the audio from the turntable into your computer.
1. Some Macs have audio input sockets, and you can plug a jack in there that connects to your amp's output. If your Mac doesn't have an audio in, then you'll need to buy a USB audio interface.
2. You can buy turntables that have USB connections, so the audio goes straight into the Mac.
As for software, you just need a program that records sound. QuickTime Player will do this, but it is limited. Audacity is a free open-source audio editor. There are others like Sound Studio.
Bear in mind that your recording will lose quality at every analog stage: the needle, the amp, the Mac. If your recordings are not rare, you might be better off buying digital versions directly from iTunes or other store.