Check to make sure you have power to the drive. If the dc connector is tight unplug it and plug a different dc connector in to the cd.
Use a connector that is on a different feed loop. If you have to swap the connector on the hard drive and the cdrom.
Does the light flash when the computer is booting.
Use a paperclip and open the door to the drive.
If there is a disk in the drive remove it.
Slowly make sure the tray moves without jaming.
Slowly, (you are pulling against the motor and gears. You will or should feel some resistance.), pull the tray all the way out.
Now press the button to see if it will close under power.
If it will not close under its own power, and you have check the power connections. Then you probably will need to replace the drive.
Good Luck Lee