PRINT OUT this reply for reference.
A 2008 cannot do internet recovery at all. Don't bother trying.
The "recovery partition" may (or may not) be present.
To see if it is, try this:
1. Machine should be powered OFF
2. Press power on button
3. Immediately hold down "command-R" and keep holding it down.
4. Do you get there?
5. If you do, you can then erase the internal drive and "start fresh". BUT BE CAREFUL. You could possibly erase the drive, run into trouble, and be left with a non-booting old Mac. For this reason, I would create a bootable cloned backup of the internal drive first, using either CarbonCopyCloner or SuperDuper (both are free to download and use for 30 days).
If that doesn't work...
Boot up the machine "as it is".
You need to ascertain WHAT VERSION of the OS is currently installed.
Go to "About this Mac" under the Apple menu and it should tell you.
WRITE THE VERSION DOWN
Now you can explore "where to go next".
I would suggest OS 10.11 (El Capitan) for an old iMac.
It's "relatively recent", even though it's not receiving updates any more.
It will still run "well enough" on an old Mac.
You can get it here:
https://support.apple.com/en-us/HT206886
https://itunes.apple.com/app/os-x-el-capitan/id1147835434?mt=12
(the installer app usually downloads into the Applications folder, just for reference)
Once you have the installer, you can use DiskMaker X to create a BOOTABLE USB flash drive installer (you need a USB flashdrive 8gb or larger to make this). Here is the correct version to use for El Cap:
http://diskmakerx.com/downloads/DiskMaker_X_6rc5.dmg
Now, take the USB installer to the iMac. Connect it and press the power on button, and then IMMEDIATELY hold down the option key and KEEP HOLDING IT DOWN until the startup manager appears.
Select the USB installer with the pointer and hit return.
That should get you booted to it.
Remember to erase the internal drive first to "Mac OS extended with journaling enabled, GUID partition format".
Then run the installer on the internal drive.
When done, you should see the login display, "just like new".