First, basic reason can be Dirt. Open the CD tray through the pin and try some manual in-out movement. Then give it a natural glow, by pressing the "Eject" button....
Is still facing issues, check the following -
Locking device / software installed - First, verify no locking software is being loaded which would allow the CD-ROM tray not to open. If you are unable to determine this, reboot the computer and as it is booting up, attempt to eject the tray.
No power to computer or CD-ROM drive - If you have recently installed a new CD-ROM drive or you have moved the computer, it is possible that the power to the CD-ROM may have become loose or disconnected.
Bad eject button - If you are running Microsoft Windows 95, Windows 98, Windows NT 4.0, Windows 2000, Windows ME, or Windows XP, open My computer, right-click on the CD-ROM drive and choose the option to eject.
If this ejects your CD-ROM drive tray, it is likely that the button on the CD-ROM drive has become defective and it is recommended that the drive be replaced.
Incompatibility with IDE / ATAPI interface - If you are unable to open the drive, attempt to temporarily disconnect the IDE cable to verify that you not experiencing an issue with an incompatibility between the CD-ROM and motherboard. Once the IDE cable has been disconnected, power on the computer and see if the CD-ROM drive tray is now able to be opened.
If the drive is able to be opened with the IDE / ATAPI cable disconnected, it is recommended you use the interface card supplied with the CD-ROM drive or the ATAPI interface on the sound card / motherboard.
Bad drive - Unfortunately, if after following the above recommendations you are still unable to properly open the CD-ROM drive using the button on the front of the CD-ROM drive, it is likely defective and should be replaced.
Caution: If you are able to open the CD-ROM drive using a paper clip. It is not recommend that you continue using the CD-ROM drive by manually ejecting the CD-ROM using a paper clip. The drive should be replaced and this is not meant to be used as a temporary solution.