most computers will have a recovery option on the HDD. DO NOT FORMAT THE HDD!!! simply run the recovery solution provided with your computer, it will format your drive for you. If you format your drive and do not know what you are doing then there is a chance that you will delete the recovery partition on accident.
If your PC does not have a recovery option, or you accidently destroy the recovery option, then you will either have to purchase a new copy of your OS, or order recovery discs from the manufacturer.