Faulty connection and corrupt drivers are two known issues that cause keyboards to not respond. Whereas the former is a hardware issue and may require purchasing additional equipment or a new keyboard, the latter is a software issue and has a costless solution.
The exact cause of a faulty connection depends on the individual keyboard. If the keyboard connects to the computer using the USB interface, it is possible that the port is broken. If the keyboard connects to the computer through an adapter, it is possible that the keyboard does not support the target interface. For instance, the Internet Keyboard by Microsoft does not work when connected to a USB port via an adapter.
It is also possible that the keyboard drivers are corrupted or missing. If this is the case, uninstalling the current drivers and restarting the computer forces the operating system to reinstall the drivers and can fix the issue.