|If you have a Desktop computer, check to be sure that all of the cables are connected, power and IDE signal. If it is a laptop, make sure that the drive is pushed in all of the way.|
If the CD-Drive won't work after that:
Bend a paperclip straight as you can. Search the front of the CD-Drive for a small hole. Put the paperclip in there, and the CD-Drive should be forced open if that is the problem you're having. Make sure to move the tray some and check for obstructions in the gears.
If you tell me the exact problem, I could help more.