In the newest versions of the boot manager (Intel only, I believe), it is possible to simply Option-Boot the computer and press the Eject key on the keyboard to eject a disc. This works even if your computer has a completely blank, newly-formatted hard drive.
This may also work on the older PowerPC versions of the boot manager, but I haven't tested it.
[
robg adds: This would have come in handy for me when I was trying to
upgrade our iMac to 10.5.7 -- one of the problems was a non-ejectable CD in the drive.]