You'll be able to go back to an earlier version by going to Settings > Update & security > Recovery. The time you have to go back depends on what version of Windows 10 your PC is running after the upgrade. For example, if your PC is running Windows 10 Version 1511, you have a month to go back to your previous operating system. If your PC is running Windows 10 Version 1607, you have 10 days to go back. (To see what version of Windows 10 your PC is running after you upgrade, select the Start button, then select Settings > System > About.
If go back isn't available:
Check to see if you can restore your PC to factory settings. This will reinstall the version of Windows that came with your PC and remove personal files, apps and drivers you installed, and any changes you made to settings. Go to Settings > Update & security > Recovery > Reset this PC > Get started and look for Restore factory settings.
Or, if you have a product key for your previous version of Windows:
Use the media creation tool to create installation media for Windows 8.1 or Windows 7, and use it to do a clean install.