Which model iMac do you have? If you have a pre-Lion iMac then I suggest booting from the Mac OS X Install DVD that came with your system. Once you select the language you should be able to move the mouse cursor to the top of the display and pull down the Utilities Menu. Select Disk utility. The following article will provide more information about Disk Utility.
http://support.apple.com/kb/HT1782
My recommendation is to click on the Verify Disk option to see whether your hard drive is experience read/write issues or whether there are some simple errors that can be recovered. If Disk Utility reports any unrecoverable errors then you should seek technical assistance, especially if you haven't been backing up your important data regularily. Data backups are a lot less expensive than trying to recover data from a hard drive that is no longer functioning correctly.
If you have a Lion (Mac OS 10.7.x) system then you can simply hold down the command-R keys while booting the system instead of booting from the Install DVD. Once you select the correct language you'll have access to a menu that includes the Disk Utility.