To detail a bit more:
If you bought a OEM (Dell, Lenovo, HP, etc.) and took that 'drive' and plugged it into another computer - You can NOT use that copy of Windows, it will refuse to work and it isn't just a "KEY" you need. You need to WIPE that OEM edition off the drive then reinstall a "off the shelf" copy of Windows (www.windows.com) to reuse that drive in another PC.
If you bought a "off the shelf" copy of Windows and installed it on your HDD, that W10 is 'licensed' to that registered hardware of that computer. If you MOVE that HDD to another system, then you will need to reregister that license, which requires either using the automated telephone number (it tells you to call) OR speak to a Microsoft actual person to discuss what you did.
Since Windows 8, Microsoft has been requiring the OS to 'register' itself to the MS servers. This has now 'phased out' "KEYS". Your licensed copy HAS TO register (activate) online to be allowed to work, and 'validate' the configuration to ensure it isn't a PIRATED copy of Windows. Any changes to the hardware is then subject (as noted above) to the terms of that copy of Windows (OEM vs off the shelf).