We may need more info to give any meaningful advice...
If its a Macbook or Macbookpro, remove the battery, reseat it and try again... if its a iMac or macpro, pull the power cable for 10mins and then retry.

I believe holding down the mouse button when you turn it on should force it to eject anything in the optical drive.
