Did you have something along the lines of a 'Software Recover Disk' provided with your PC? If so this will enable you to re-load the operating system completely. You will usually have to boot off this CD-ROM, so insert the disk into your CD-ROM drive, and re-start the PC.
You SHOULD have some form of menu-driven instructions presented on the screen, with options to re-install your operating system, recover files etc. However I've never done this with a HP computer, only Dell and Fujitsu ones previously. I'd be surprised if HP didn't have a good recover disk, they are usually very good at this sort of thing.
I think you are already aware of this, however you will lose absolutely EVERYTHING you've had on your PC once you've performed this. So save any files you need, Web browser favourites, etc. Also you may need to ensure you have all the correct drivers for your various connected devices, such as printers, broadband modems etc. Windows SHOULD pick them up automatically, but it doesn't hurt to prepare!
Don't be daunted - it's worth doing this every now and again. You'll probably find your PC will run a lot smoother once completed.
Good luck!
Ross, February 2010