Does the CD get mounted or is it in a state of being in the drive but not
mounted onto the filesystem?
You can check this in the Terminal
2 steps:
1) issue the command "mount" (sudo not needed) with no options, just type the
word mount and hit ENTER. You will see a list of drives and other things
the filesystem has mounted.
2) If you know your CD/DVD is in the tray and there's no app currently using
it, just enter the command "eject" and press ENTER
It should then eject unless there's a "resource in use" type of error.