Upgrade versus full
There's a lot of confusion and misinformation about what happens to your existing copy of Windows when you take advantage of the free upgrade to Windows 10. Can you subsequently transfer that copy of Windows 10 to a new PC? The answer depends on the version of Windows you're upgrading from, and when you perform the transfer.
If your original copy of Windows came pre-installed on your computer then it's what's known as an OEM (Original Equipment Manufacturer) version, and is tied to that PC. This means that Windows 10 is also tied to that PC, so you can't move it to another computer.
If, however, your copy of Windows was purchased as an upgrade or full version of Windows separately from the PC, then you can transfer Windows 10 to another PC, but only before 29th July 2016. You'll need to remove Windows 10 from your old PC, then install your older copy of Windows (7 or 8.1) on your new PC, activate that (you may need to do so over the phone) and then perform the free upgrade to get Windows on that PC.
After 29th July 2016, however, your free upgrade of Windows 10 will become permanently tied to the PC it's currently installed on. You won't be able to move it to another computer. You can, however, reinstall Windows 10 on that PC as many times as you like – just skip the prompts for a product key.
Also be careful when upgrading hardware – if too many core components change (and in particular the motherboard), Windows will think you're trying to run it on a new machine and demand you buy a new license. Microsoft's advice is to click Start > All Apps > Contact Support, then choose Services & apps > Windows > Setting up to talk about your activation issues – hopefully the customer support team will be sympathetic and let you reactivate manually.
If you purchase a fresh copy of Windows 10, then it's only tied to your PC if you purchase the cheaper OEM version. If you purchase a standard boxed retail copy (upgrade or full), you should be able to transfer that copy of Windows to another PC, so long as you remove it from your old computer first.