When you upgrade a Windows 7 or 8.1 system to Windows 10, the installer confirms that you have a "genuine Windows" system installed and activates your computer for use with Windows 10. Note that you don't actually get a Windows 10 product key - instead, your computer's hardware is registered with Microsoft's servers. When you install Windows 10 on that PC again in the future, it will check in with Microsoft's servers, confirm it's installed on a registered PC, and automatically activate itself.
If you don't take advantage of the upgrade process first, this registration will never happen. There's no way to enter a Windows 7 or 8.1 key into the Windows 10 installer, nor is there some sort of web form that will give you a Windows 10 key if you provide your Windows 7 or 8.1 key. Sorry - you'll have to upgrade to Windows 10 before you can perform a clean install.
*snip*
Select "Install Now" once the Windows installer starts. When you reach a screen asking for your Windows 10 product key, click the Skip button. You won't actually have a Windows 10 product key if you took advantage of the free upgrade offer.
*snip*
You'll be asked for the product key after the process is finished. Just click "Do this later" to skip this part and continue the setup process.
After you log into your new, clean-installed Windows 10 system, it should automatically activate itself after you connect to the Internet. If you took advantage of the free upgrade offer, it does this by checking your computer's hardware and then checking in with Microsoft, verifying that your hardware configuration is authorized to use Windows 10.
When we reinstalled Windows 10 Pro on our computer, it activated immediately. But, if Microsoft's activation servers are overloaded, so it may take some time before your system activates. You can open the Settings app, select Update & security, and select Activation to check your activation status. If it's not activated, you may see information here that can help you activate.