CD doesn't eject
Solution 1:
The first thing to try in these cases is to restart the computer and hold down your Eject key or Mouse/trackpad button while it's starting up.
If that doesn't work, try Resetting the SMC on an Intel based mac, or a PMU reset on an older PowerPC machine, then try again.
If that fails, you'll want to bring the machine into an Authorized Service Center if it's under warranty, or look into less orthodox solutions if not.
Solution 2:
I had a similar solution to TrentEllingsen. My CD drive would not relinquish this stuck CD. Not with a terminal command or eject button or what have you.
I eventually decided to go about it manually. First I tried using a card to leverage the CD enough so that "drutil eject" would work but after several tries it was obvious it wouldn't. So I rubbed on some elbow grease and grabbed another card. I slid one under the CD and the other on top. Then, like using a pair of card-nosed pliers, I pinched tight, pulled gently, and out came the CD... with protective slip attached! That was the last time I let my girlfriend burn anything on my mac.