I'm guessing that your headphones plug directly into your CD-ROM drive, however, to listen to MP3s you would need a sound card would need to plug your headphones into the speaker out socket to be able to hear anything.
To check this, right mouse click on My Computer icon and select properties, then select device manager, look for an entry under sound, video and game controllers.
A lot of companies disable on-board sound devices in such a way that the average user is not able to re-enable them.