Music on CDs or mp3s etc are stored digitally. They're all bits. 1s and 0s.
This is fine for storage, but speakers and amplifiers both work with electrical represenations of SOUND WAVES which are analogue
A DAC converts the 1s and 0s on the CD/mp3/whatever to electrical versions of the sound waves. An amplifier is able to increase this electrical signal (make it louder). How would an amplifier increase digital signal (make the 1s and 0s bigger? doesn't work). Thus, an amplifier needs the music to be in analogue to work)
A speaker has a coil of wire in it which moves back and forth when an electrical signal is applied to it. Thus, the speaker also needs an analogue signal in order for it to work.
In summary, music is stored on CD in a convenient format of 1s and 0s. In order to turn this music-information into a signal which is able to be amplified and then played with a speaker, it needs to be converted to an analogue signal. And that's what a DAC does. It turns the information on your CD/Mp3 into analogue signal
edit:
so you ask.. you already have a CD player, an amp and headphones.. so why do would need a DAC?
The answer? you already have one! there is a DAC located inside your cd player! A cd player has 2 main components: the "transport" (the bit that reads the 1s and 0s off the CD), and the "DAC" (the bit that converts the 1s and 0s to analogue signal to be sent to the amplifier)
Some people use dedicated/external DACs. These are simply DACs housed in a different box that can be connected to the "digital out" of the CD player. As the name may suggest, a "digital out" is an output which outputs digital data (ie data that hasn't been put through the CD player's DAC yet). In this situation, the CD player is simply acting as a "transport" (the DAC isn't being used) and instead the digital information is being sent to a separate DAC which will convert it to analogue to then be sent to an amplifier
So why would someone want this? Well maybe their CD player doesn't sound good enough, but they think the transport in it is okay. So instead of going out and buying a new CD player (thus replacing both the transport and the DAC) they simply buy a DAC and connect it to the CD player's digital out. Therefore they get to keep the good transport in the old CD player, while getting a better DAC. This is cheaper than buying a whole new CD player.
Also, a DAC can be connected to a computer which has a digital out. Most computer soundcards contain a DAC but it's usually pretty cheap and crap.. so basically the only way to get GOOD sound out of a computer is to connect it to a DAC somehow. You can see from my signature that I connect my laptop to a DAC by using a USB converter (click the link in my sig that looks like ">" to see how it looks). This dac then connects to my amp which connects to my speakers. The computer holds digital information (mp3s) which it sends to my DAC via USB. my DAC converts the mp3 data to analogue signal which my amp amplifies and then my speakers play