First of all, you need a CD/DVD or a removable USB device which contains the installation files of the operating system. If you don't have any of those you will have to download the installation files of Ubuntu from the official website and burn them to a CD/DVD or make a bootable removable USB device.
If you don't know how to burn a CD/DVD or make a bootable USB device, check out the don't know how to make a bootable (burn) CD/USB solutions.
Once you have a CD/DVD or a bootable USB follow the steps below:
Enter the product key and click Next (or just click next to skip the step)
Select the partition in which you want to install Windows 8.1 -> Drive options (advanced)
Note: Don't interrupt the process and be near the computer in case if something unexpected happens. Don't be alarmed if the computer restarts because that is a part of the process.
If you use a laptop, connect it to the AC adapter to prevent it from shutting down.
If you don’t receive the email in the next 2 minutes please check your junk folder, and add [email protected] to your safe sender list.