Depends on if its a OEM (for example included with a Dell or HP) copy or not. If its a retail copy you should be able to just reinstall it. If its OEM you will need to buy a retail copy of Windows or look for a cheap OEM key, usually 20-30usd.
Of course you can just download and use Windows 10 without a key with some minor restrictions and a watermark.