Search and Apple.com will have told you you can if you have a Mac not older than 5 years.
How to depends on the iMac you have as there are adapters needed, either mini DVI to DVI or VGA, or mini Display Port to DVI or VGA.
EDIT: Didn't see the signature, but will leave the comments for future generations of non-searchers.