I have done this. I connected an audio cable to the headphones jack on my tape player and connected the other end to the Line In port on the sound card in my computer. Since both ends of this cable needed a male-type plug, I had to get an adapter. Radio Shack is a good place to get unusual adapters and such things as extension cables, which you may need if your tape player is some distance from your computer.
To capture the recording on your computer, you can use Windows Media Player or some other audio software if you have any installed. The last step would be to burn the music recordings to a CD.