That flashing icon means you have no bootable volume on your computer. You didn't mention which iMac you have, or what version of OS X you had on beforehand, so my ability to advise you is severely limited. Anyway, one of 2 things has happened: the drive got wiped and "something" went wrong with the installation, which is fixable by booting off an install disc, or the drive has outright crashed.
Try rebooting with the OPTION key held down. Do you have a Recovery Partition you can boot from?