1. Open Disk Utility in your Utilities folder. If you need to reformat your startup volume, then you must boot from your OS X Installer Disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu.
2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area. If it does not say "Verified" then the drive is failing or has failed and will need replacing. SMART info will not be reported on external drives. Otherwise, click on the Partition tab in the DU main window.
3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID (for Intel Macs) or APM (for PPC Macs) then click on the OK button. Click on the Partition button and wait until the process has completed.
4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
Steps 4-6 are optional but should be used on a drive that has never been formatted before, if the format type is not Mac OS Extended, if the partition scheme has been changed, or if a different operating system (not OS X) has been installed on the drive.
When formatting has completed quit DU and return to the installer. Complete the OS X installation.
Most of that information is right in your owners manual, my guess is you haven't read it. If you have lost it you can download a copy at: http://support.apple.com/manuals/#imac . You should find instructions on about page 54.
To reformat your HD insert the Install Disc that came with your computer, restart the computer while holding down the Option key and choose the Install Disc, select the language, Click the Utilities menu, open Disk Utility, highlight the HD on the left hand pane, click the Erase tab, ensure Format is set to Mac OS Extended (Journaled), click Erase. Then exit Disk Utility and continue with the install.
However unless you have totally messed up your iMac there is probably absolutely no reason to reinstall the OS. It's not MS Windows that has to have the OS reinstalled every year or so to run OK. Why do you feel it needs to be reinstalled?