Turn on your PC so that Windows starts normally, insert the DVD or USB flash drive, and then shut down your PC.
Restart your PC, and then press any key to boot from the DVD or USB flash drive.
If you restart your PC and your current version of Windows starts, you might have to open a boot menu or change the boot order in your PC's BIOS or UEFI settings so that your PC boots from the media. To open a boot menu or change the boot order, you'll typically need to press a combination of keys (such as F2, F12, Delete, Esc, etc.) immediately after you turn on your PC. For instructions on changing the boot order for your PC, check the documentation that came with your PC or go to the manufacturer's website.
If your current version of Windows still starts, try again by waiting until Windows asks you to sign in, shutdown completely, and then restart your PC again.
On the Install Windows page, enter your language and other preferences, and then tap or click Next.
Tap or click Install Windows.
On the Enter the product key to activate Windows page, enter your product key.
The product key should be on the box that the Windows 8.1 DVD came in, or in a purchase confirmation email. It looks like this: PRODUCT KEY: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX.
On the Please read the license terms page, if you accept the license terms, tap or click I accept the license terms, and then tap or click Next.
On the Which type of installation do you want? page, tap or click Custom.
On the Where do you want to install Windows? page, do one of the following:
In Windows 8.1, tap or click the partition that you want, tap or click the formatting option you want to perform if needed, and then follow the instructions.
In Windows 8, tap or click Drive options (advanced), tap or click the partition that you want to change, tap or click the formatting option you want to perform if needed, and then follow the instructions.
When you've finished formatting, tap or click Next.
Follow the instructions to finish installing Windows.