Updated, July 31 @ 15:55 BST (10:55 EDT): This story has been updated with a few more details, and some other (quicker) ways of achieving an almost-clean installation of Windows 10.
Windows 10 is an unusual release for Microsoft: if you have a licensed version of Windows 7 or 8/8.1, it will very easily upgrade to Windows 10—you don't even need to enter a licence key. Clean installations, however, are a bit trickier: you do need to enter a licence key, and your Windows 7/8 key probably won't work.
Fortunately, if you're running Windows 7 or 8, and you really want to use your free Windows 10 licence key to perform a clean installation rather than upgrade, there is a solution. It's pretty convoluted, but it works.
First, you need to do an in-place upgrade to Windows 10. You can do this via Windows Update, or if Windows Update isn't playing ball you can use the direct download tool: English/American/German/French/Italian/Dutch. If you use the download tool, make sure you select "Upgrade this PC now." It goes without saying that, before you install any new operating system, you should back up any important data beforehand.
Once the upgrade has completed, make sure you've been activated by Microsoft. Open up the new Settings app, then head to Update & Security, Activation. It will say on the right whether you're activated or not (see image). Also note down what version of Windows 10 you have (Home, Pro).
If you haven't yet been activated, you can try forcing it via command prompt: run
cmd.exe as an administrator, then type
slmgr.vbs /ato. You may need to try a few times, as the activation servers were being hit quite hard.
This first step will convert your current Windows 7/8 key into a Windows 10 key.
Now you need to install Windows 10 again! Grab the Windows 10 download tool and run it. This time, select "Create installation media for another PC." Select the appropriate version (Home, Pro) and the tool will generate an ISO for you. Let the tool help you burn the ISO to a DVD or USB memory stick.
Now, proceed with a clean installation of Windows 10 (select "Custom: Install Windows only" when prompted.) When it asks you for a product key, click Skip. If it asks you multiple times, just keep hitting Skip.
Once you've installed Windows 10, it should activate normally. Again, you might need to manually slam the servers using
slmgr.vbs /ato. Voilà: a clean installation of Windows 10.
In theory, you should be able to reinstall Windows 10 again in the future on the same PC, but if you make significant hardware changes you might need to use the manual telephone activation process. Currently, it isn't clear if you can take your freebie Windows 10 licence key and use it to install Windows 10 on another machine. Some users are reporting that ProduKey, Magic Jelly Bean, and other key-viewing tools have enabled them to get a new Windows 10 licence key that can be used on another machine, but some users are just getting a generic licence key that isn't transferable. Your mileage may vary.
Caveats and other gotchas
Obviously, it's crazy that you have to go through a full OS installation just to upgrade a licence key. It would be a lot easier and faster if Microsoft provided some kind of tool that converted Windows 7/8 keys to Windows 10.
If you bought a retail copy of Windows 10, this guide doesn't apply to you at all: you'll have a Windows 10 licence key that can be used directly during the installation process.
Another option, rather than installing Windows 10 twice, is to click the small "change what to keep" button during installation, and then select "nothing" from the following screen. This will delete all of your files, apps, and settings. This will be functionally the same as performing a clean installation, but there may be small underlying differences.
Another method is to upgrade to Windows 10, head into the new Settings app, and go to "Update and recovery." From there, you can click "Reset this PC," which gives you the option of reinstalling Windows 10 and either a) keeping your apps and files, or b) wiping everything clean. Again, this isn't quite the same as a clean installation, but it's very similar.
If you do opt for the upgrade-then-install method, one slightly faster route is to download and burn an ISO the first time you run the tool, and then upgrade from that ISO. You can then use the same installation media to do a clean installation, rather than downloading Windows 10 again using the tool.
If you get the following error when trying to activate Windows 10, don't panic: "Error code: 0xC004C003. Activation server determined that the key has been blocked." Some users are reporting that they are seeing that error, even with a legitimate key, perhaps due to the activation servers being overloaded. Of course, if you're not actually using a legitimate licence key, then... well... do panic.