During the 1980s computer manufacturers tended to slavishly follow what IBM did making their products a de facto standard.
When IBM launched the Personal Computer (PC) the keyboard connected to the main part of the machine via a 5-pin DIN plug. When the AT computer came out the keyboard had an improved layout and lock lights were added. Operating these needed a change in the protocol, ie the language the keyboard and computer use to talk to each other. Some keyboards were made with a switch so they could use either protocol and some could automatically switch to the correct one.
A couple of years later the Enhanced keyboard layout was introduced which, apart from the addition of Windows keys in 1995, is the type that's still standard.
The next change was when IBM introduced the PS/2 range of computers. On those the keyboard, and mouse, were connected via a 6-Pin mini-DIN plug; these often get called PS/2 connectors. These remained standard until USB took over, and there are still (2018) some keyboards being made with PS/2 plugs and computers with PS/2 sockets.
All that's needed to use a 5-pin AT keyboard on a PS/2 equipped computer, or vice versa, is a simple adapter to change the plug.
There are also adapters to connect a PS/2 keyboard to a USB port but it's a bit of a mine-field. Some are passive and do nothing beyond changing the shape of the plug. These will only work on keyboards that are bilingual, ie that can use either the PS/2 or USB protocol, as the adapter doesn't translate PS/2 signals to USB. These devices tend to look like this:--
When IBM launched the Personal Computer (PC) the keyboard connected to the main part of the machine via a 5-pin DIN plug. When the AT computer came out the keyboard had an improved layout and lock lights were added. Operating these needed a change in the protocol, ie the language the keyboard and computer use to talk to each other. Some keyboards were made with a switch so they could use either protocol and some could automatically switch to the correct one.
A couple of years later the Enhanced keyboard layout was introduced which, apart from the addition of Windows keys in 1995, is the type that's still standard.
The next change was when IBM introduced the PS/2 range of computers. On those the keyboard, and mouse, were connected via a 6-Pin mini-DIN plug; these often get called PS/2 connectors. These remained standard until USB took over, and there are still (2018) some keyboards being made with PS/2 plugs and computers with PS/2 sockets.
All that's needed to use a 5-pin AT keyboard on a PS/2 equipped computer, or vice versa, is a simple adapter to change the plug.
There are also adapters to connect a PS/2 keyboard to a USB port but it's a bit of a mine-field. Some are passive and do nothing beyond changing the shape of the plug. These will only work on keyboards that are bilingual, ie that can use either the PS/2 or USB protocol, as the adapter doesn't translate PS/2 signals to USB. These devices tend to look like this:--