Formatting your hard drive is done using a Windows XP cd(if you plan to install Windows XP).
Set your BIOS to boot from cd-rom,boot from the Windows cd,follow the instructions and re-install Windows.
Make a backup of your important files first. :)
Good luck