Here are the technical requirements for Snow Leopard:
If your iMac meets the requirements, then you will have to purchase the Snow Leopard disk from apple:
To reinstall your OS, insert the original OS disk that came with your iMac and start up the iMac holding the C key. Start the installation process and when you see the menu bar, select 'Utilities'. From the drop down menu, select Disk Utility. Erase the HDD and the continue the installation.
Note that this will erase all data on the HDD so have it backed up before you start.