Please be sure you have completely backed up the files on that HDD BEFORE doing a format as they will be lost permanently.
Once the drive is formatted, just follow the instructions to install windows. If your computer came with a license, you should find it on your case as a small blue/ turquoize sticker. Remember to remove the battery and check under that if you don't find it anywhere else. And otherwise, you'll have to purchase a license or, well find another way.