Look on the front of the drive. Normally there is a very small pin hole somewhere in the front. Take a paper clip, straighten in out, and press it into the hole. There is a manual release behind that which should open the tray so you can get whatever is it in out.
Now, as for why it is not working....
When you turn on the computer, do you get a momentary light on the drive? If not, the power cable has come loose from either the back of the drive or at the other end where it plugs into the system board. If you do get a light, then check the IDE cable or SATA/PATA cable instead.
If the drive is IDE, follow the grey ribbon (IDE) cable and see if there is a second device attached somewhere on that cable. If it is NOT your primary hard drive, temporarily boot the computer and see if the CD drive reappears. If it does, you have a conflict between the two devices and will need to check the master and slave settings for each.
If the device is on its own cable (or you have unplugged the second device and the CD drive is still missing) that the drive may have gone bad and will need to be replaced.