Ever wondered how licensing works now comes Windows 10? Back in previous Windows OS, as soon as your pc glitches the last resort for salvation is through fresh install of the system.
I can just boot from my DVD drive using the OS CD and input back your serial number and away you go.
This is still applicable in the latest Windows 10. You can also create a boot USB disk if you are trying to install to a different drive. But somewhat came as a bit confusing as many devices now came pre-installed with the OS.
If you are building your own system, you will need to buy your own license or if you have a Windows 8 or 7. You can go to the upgrading route. When your build PC you have to know that, new motherboard = new license.
Here is a link that will help you understand a little bit the process how installation of new OS works.
In other words, when you buy a new PC loaded with operating system, you need to ask how they installed the OS. And make sure you get the serial key off them by hook or by crook if its not already on the physical box on the sticker.