You have to buy it if I'm not mistaken, you only get a free upgrade. You had to have had win 7 or 8 or 8.1 to upgrade to 10.
You would boot the computer with a os disk in the drive, boot from disk, instal, repair bottom left, command prompt and use diskpart to format and clean the disk. Then just install the os, and upgrade once booted