You're going to need bootable media, that you know is capable of booting your particular system.
The fact that you mentioned that "windows 10 was running fine" would make it unnecessary to re-install a previous version of Windows and upgrade again. You should be able to just re-install Windows 10 and it should activate just fine.
You express some concern as to the health of your hard drive and your optical drive. I would think it highly suspicious that both would have presented with problems almost simultaneously unless there is something more critically wrong with the system (motherboard and or storage controller chipset).
We know nothing about the actual system, how old or how new it might be, whether or not it has UEFI or Legacy BIOS..... so some system specs might help.
Do you have another system that you can use to obtain the Windows 10 installation media (friend, relative, neighbor, cyber café, etc.,)
https://www.microsoft.com/en-us/software-download/techbench
Choose Windows 10, the first item in the first drop down (not single language at the bottom)
Next choose your language and your bit version (32 or 64 bit to match your system architecture or in the case of an upgrade, to match your currently installed version of Windows).
That will provide an ISO that will upgrade (or clean install) either or both Windows 10 Pro and Home.
Once you have downloaded the ISO you can use ImgBurn to burn it to a DVD
http://imgburn.com/index.php?act=download
OR
Rufus to burn it to a USB ThumbDrive
http://rufus.akeo.ie/
When you've created the installation media you should be able to use that to boot your system and clean install Windows 10