Troubleshooting a keyboard that doesn't work at all often tends to be an easy fix. Make sure the keyboard is plugged into the computer correctly. Shut down the computer first, and then unplug the keyboard from the port. Verify that it is in the correct port and then restart the computer. Not only might the keyboard have been plugged into the wrong port, but if you have a PS/2 port and the keyboard cable was inserted while the computer was turned on the computer might not have recognized the keyboard.
If you have a wireless keyboard, the first troubleshooting step to take is to try installing fresh batteries. Also, make sure the adapter for the wireless keyboard is inserted properly into the computer.
If the keyboard is still unresponsive after trying these troubleshooting steps, check the status of keyboard's driver. To do so, go to the Control Panel from the Start menu. Open System from Classic View or System and Maintenance from Category View. Open Device Manager. Expand Keyboards by clicking the "+" to the left of it. Right click the name of the keyboard you are troubleshooting and select Properties. On the General tab, check the Device Status box to see if there is a problem detected. If not, go to the Driver tab. Click the Update Driver button and search for updated software for the keyboard.

click to enlarge
Once you have completed all of these troubleshooting steps, your keyboard should be working again. If it is still unresponsive, try installing it onto another computer, if possible. If the keyboard does not work at all on a different machine, then the keyboard itself is damaged and will need to be replaced.