The standard way to activate Windows 8.x is to go to Control Panel / System and Security / System, then activate windows with your product key. Sometimes this can fail. If it does, you can activate from a command line.
Run cmd as an administrator, then execute this command:
slmgr.vbs –ipk "Enter-Your-Product-Key-Here"
You need to enter the quotes. Replace the text with your product key.
That’s it. As long as your product key is valid, Windows will activate.