It's possible to convert a cassette to a CD using a standalone device, but it is also possible to digitize the cassette's audio by using a computer and writing the contents to a CD with a CD burner. There are also tape players that digitize the cassette's audio and send it through a USB cable.
Many cassette players have a line-out port that can attach to a computer, and those that don't often have a headphone jack that also works. Connect this port to the line-in port on a computer, or use the microphone port if one isn't available.
Audacity is a free and popular program that can be used to record audio. Click the red record button at the top of the screen to begin recording, and then start the cassette player. The quality of the recording depends on the quality of the cassette player and the computer's sound card.
USB cassette players digitize the audio internally before sending it to the computer, so the quality depends on their internal components. Save the master file of the recording, and then use Audacity or another program to split the recording into different audio files containing each song. Saving the file to MP3 degrades the quality a bit, so it is often best to use the WAV file format to archive the file or to use the FLAC compression format, which doesn't degrade the quality. After saving the files, burn them to an audio CD, or transfer them to a digital media player.