To elaborate a bit on Jond's answer, the box most people refer to as a 'CD player' contains two main parts, a transport that spins the disc and picks up a digital signal from it and a DAC (or D/AC) that does the job Jond described, converts a digital signal to an analog signal that can be altered and then amplified by your preamp and amp (which can also be in a single box called an integrated amp.)
You would benefit from buying a DAC if you own a transport-only box that requires a separate DAC or if you wanted to take the digital signal from a regular CD player, via a 'digital-out' connector, and use a higher quality, separate DAC, bypassing the internal DAC in the all-in-one CD player in a quest for higher quality.