Click on the CD icon so that it's highlighted.
For a keyboard shortcut to ejecting a CD, you can also press and hold the Command key and then press the E key.