You can download Windows 8.1 direct from Microsoft:
You can use something like Rufus USB
to put the ISO file on a USB stick and make it bootable. You can't just copy the ISO file to the USB stick, you have to use something like Rufus to make the USB stick bootable. But it's very easy to use.
Then boot from the USB stick, and follow the instructions on screen to install Windows.
Obviously reinstalling Windows will make you lose your data so be sure you want to do this.
You may need your licence key to activate Windows - or it's possible your licence key will be stored digitally on the motherboard and will activate automatically.