All versions of the Windows operating system should automatically recognize and enable keyboards, but if the keyboard suddenly stops working, it can be re-enabled in several ways, depending on the root cause. For example, if a USB keyboard stops working, it can be re-enabled by changing the BIOS settings.
If the problem is with a USB keyboard, the BIOS settings should be checked to ensure that USB keyboard support is enabled. This can be done by restarting the computer and carefully watching the start-up screen. The screen should inform the user what key to press to enter the BIOS. This may seem a paradoxical solution, but some computers have PS2 ports that allow for older-style keyboards to be attached temporarily for this step.
Sometimes the problem is not the BIOS but the keyboard drivers. Fresh drivers can be re-installed by entering the device manager.
Of course, sometimes the problem is purely mechanical. If all else fails, clean the keyboard thoroughly, check if it is now working, and, if it is not, restart the computer to see if rebooting helps. If absolutely nothing seems to work, the keyboard is likely broken, and the manufacturer should be contacted if it is still under warranty.