To check physical connections:
Two types of keyboards:
1.) USB keyboard
2.) PS2 keyboard
USB plugs into a USB port.
PS2 plugs into a round port in the back of the computer if a desktop or in the side if a laptop. Color of plug is usually purple and goes into the purple round hole. Usually has a keyboard icon at or somewhere near the hole.
Important: Never plug or unplug a PS2 keyboard or PS2 mouse into their respective ports while your computer is on and running. Doing so can result in exactly the failure you are seeing. Often the only certain fix is to replace the motherboard or use a USB keyboard. USB keyboards can be plugged in or out without harm or damage to system when the computer is running.
Let us know what type of keyboard you have and we will go from there. Maybe your new keyboard is defective?

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic