A CD or DVD disc can become stuck in your Mac. It may not be appearing on your desktop or could be causing the computer to lock up if the computer cannot recognise it properly (usually a problem with scratched discs). In order to eject the disc:
First try the normal methods to remove the disc. Drag its icon to the Trash can in the Dock or select 'Eject' from the File menu.
If you are running a virtual machine, e.g. VMWareFusion, ensure that the CD is disconnected from the virtual machine. This will sometimes allow the CD to now show up in Mac OS X.
Shut down the computer and start up whilst holding down the mouse button. This may take some time, but keep your finger on the mouse button right up until the disc comes out or the log-in screen has appeared.
If you have Toast Titanium installed on your computer, choose EJECT DISC from the menubar.
Sometimes you can successfully use the eject disc button in iTunes even if the disc is not visible to the Finder
Open Disk Utility and choose the disc you wish to eject in the left-hand pane, then click on the Eject button.
Some Macintoshes have a paperclip hole that you can insert a straightened paperclip into, manually triggering the eject mechanism.
Open Terminal and type "drutil tray eject" to eject the disc/tray, and "drutil tray close" to close the tray.
Restart the computer while holding down ⌘ ⌥ O F, to enter the Open Firmware prompt. Type "eject cd" without the quotes, and press return. The disk ought to eject. To start into OS X, type "mac-boot" without the quotes. Press return, and the computer will continue with the startup. (This will not work on an Intel Mac. There is no Open Firmware on Intel Macs. )
If your computer has an eject button on the keyboard, restart the computer holding down ⌥. When the startup disk selection screen appears, let go and press the keyboard's eject button.