If you want to do a factory restore :
Go ahead and backup your important files , backup data files - such as pictures, music, videos, and documents then run the HP restore disc. The restore disc bring your system back to factory defaults (you will have the same programs/files on the system as the day you bought it).
To restore your system, follow these steps :
Step 1: Insert your restore disc into the cd/dvd rom
Step 2: Go to start > shutdown > restart
Step 3: Watch your computer carefully - It may prompt you to "press a key to boot from cd" or something along those lines. if you see that message simply press space or enter and the computer will load
Step 4: after the restore disc has loaded follow the onscreen instructions
If you can not find your original recover disc set, you can contact HP at 1-800-GO-COMPAQ or www.hp.com
Alternatively keep tapping f11 key while computer powers up, this will take you to HP recovery, then just follow the on-screen instructions.