If you have Windows 8 or newer you could do recovery drive (search recovery drive in Control Panel). This allows you to do clean install (with all the possible bloatware that came with the PC) and even replace the HDD if you wish - although I had some difficulties when replacing laptop HDD with SSD and some extra steps had to be taken, but I honestly don't remember what exactly. But it was doable. Also, if you have Windows 8 OEM version it ought to be bound to motherboard like said earlier (and thus even knowing the key would not allow you to install it to another PC).
Or if you have earlier version of Windows or retail version of 8 you could find out the key, get the Windows iso and re-install it if you wish. If that is the case, your OS is not bound to any part of the PC.