Here are some standard remedies.
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.
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.
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.
If your computer has an eject button on the keyboard, restart the computer holding down the Option key. When the startup disk selection screen appears, let go of the option key and press the keyboard's eject button.