I have done this many times!
There are a few ways to do this as it does depends on the person.
If you have a laptop, the installation files should have been supplied on the hard drive and on a CD inwhich you switch on your laptop on with the disk in the drive and follow the instruction.
For PCs that were purchased as is like some package such as HP ect..., you should have your installation disk at hand.
Place that disk in your DVD/CD rom drive and boot and follow the instructions.
There usually are 2 or 3 options:
a) Format a hard drive - then install (this clear everything as new)
b) or just install (Just install will replace any damaged Windows files that might have been giving a problem but keeps all your hardware setting and documents intact and this resolves a lot of problems.
This works great and you should not worry about a thing! best of luck!