1) make sure your 1st boot device is CD-ROM(assume your boot disk is a CD)
(go to BIOS to check).
2) Copy(back up) all your importants docs from C on a DVD/CD before you re-install the operating system(which normally will FORMAT hence delete everything on your C drive)
3) Load your boot CD into the DVD/CD rom, then re-boot your computer
4) it should boot from the CD and then just follow the step by step instruction to re-install your operating system.
5) after that, copy the back up files from the CD and load them back to your C.
My suggestion, partition it this time, so that you save all your files on a different partition rather than on C, this way, you won't have to worry next time when you format your hard drive again.