There is an adapter that apple sells (cant remember if it came with the imac.... did come with my ibook however) that connects the |O| port to a monitor. However, spanning is disabled in the firmware and you can only "mirror" your screen.
Fortunately there is a hack for this!!!
http://www.rutemoeller.com/mp/ibook/ibook_e.html
that will let you span AND acheive higher resolutions on the second monitor that you use. Its just a PRAM hack so resetting your PRAM sends it back to normal... NO permanent damage.
NOTE: DO NOT USE ON ATI RAGE BASED IMACS.... IT COULD KILL THEM. RADEON IBOOKS AND NVIDIA IMACS ONLY