This will show you how to eject a stuck dvd or cd from your mac
1) try holding the eject key, it may work
2) try dragging the mounted cd to the trash, it may work
3) open finder and try clicking on the eject button next to the cd or dvd in the sidebar, it may work
if the above havent worked, then
1) open disk utility (applications > utilities > disk utility)
2) click on the drive in the left sidebar
3) click eject at the top of the disk utility app
if all of that hasnt worked
1) reboot your mac and hold the option [alt] key when it starts
2) when your mac presents you with a list of harddrives, press the eject key
if that doesnt work,
1) reboot your mac and hold the mouse button while it starts