If it's an older Mac then you might see a manual ejection hole next to
the drive slot, or hidden in the corner of the slot itself. You can
push a bent paperclip into that to eject.
If that's not present, you might be looking at a repair job. I've
known Apple fix this under warranty, but I guess if the disk is faulty
then technically it's your fault. Like I say, I've known them repair
the drives and not charge, but your milage may vary.
Robert