It looks like a hardware problem, but just in case, try to reset the SMC > http://support.apple.com/kb/HE57
If it doesn't work, maybe there's a process running that makes your iMac get hot. Open Activity Monitor, select "All Processes" above "Show" (in the toolbar). Then, go to File menu > Save, open the saved file and copy it here, so we can access to a list of all your processes and we can identify if there's something wrong.
Also, you should run Apple Hardware Test, so insert the Mac OS X Install DVD that came with your computer, and press the D key while your Mac is starting to access to Apple Hardware Test. Choose your language, tick the option to run an extended test and then, start the test. If there's an error at the end, copy it here and take the computer to an Apple Store to get it repaired