Try to boot to your hardware diagnostic partition.
Restart, while holding the letter D on your keyboard.
You should start up in the diagnostics, so run both the standard, and extended tests.
Or, boot to your original restore DVD (disk #1, I think) with the same process (holding the letter D), which should also start up with the Hardware test.
If that test passes, or you can't get to that test at all - restart again with your restore DVD in the drive, while holding the letter C. That will force your iMac to boot to the installer.
You will go through a screen asking you to choose a language, then a couple of Windows to accept the license.
You'll see some menus at the top of your screen, so choose Disk Utility from the Utilities menu. Choose your hard drive from the list on the left, and click Repair Disk. If anything is repaired, run the same Repair Disk, until no problems are found. Restart then.
If it restarts OK, you should be good.
If the Repair Disk fails with a continuing error, or you just don't see the hard drive at all, then you likely have a failing hard drive. You're in warranty, so call AppleCare for help with that, or take in the shop where you purchased your iMac.