You could really have a hardware problem many times with CD/DVD Drives I've seen the actual switch that opens the drawer bent back wards and broken which results in the drawer not opening.
But it's also possible that you have some Spy Ware on the system that's causing the Optical Drive not to open so I would first suggest that you run a Spy Ware scan with the following pieces of software
http://tinyurl.com/du0h
run this one first and then
http://tinyurl.com/yrwy2
You'll need to download both of these install them reboot if asked to and the apply the updates. When they are both fully updated reboot into [b]Safe Mode[/b] and run the Ad Aware SE Scan first and remove anything that it finds and then keep running it until it comes up as clean or you find something that you [b]Can Not Remove[/b] them run the Spy Bot S & D Scan but you'll need to be careful with this one as it has the ability to pick up some software that you may be using things like Windows Defender and Internet Banking just to name 2 but there are others that it will pick up so if you recognise any thing that it pick ups that you use untick it and then remove the rest. Repeat the scan to make sure that there is nothing else residing on the system that was hidden by the first scan and then reboot into Normal Mode and see if it works properly.
[b]Remember that Safe Mode is only there to work on the OS and it doesn't mean that it's safe to Download or log onto a LAN with as there are the minimal set of Drivers Installed and most of the software isn't running so the chances of picking up an infection in this mode are much greater.[/b]
Col