If it's an IBM Model M, the cord plugs into the keyboard via a telephone-type plug.
Unicomp(owner of the current rights/tooling to the Model M) says that PS/2 type keyboards can't be converted to USB, but there are USB cables on Ebay that will plug directly into a Model M.
I have a few older PS/2 model Ms, including some late 80s/early 90s manufacture IBMs and one special edition Unicomp that I like getting out when the occasion warrants it. I run all of them via a PS/2 to USB adapter that was maybe $10 at Office Depot. I've quit using those mostly since getting my Spacesaver M from Unicomp(a buckling spring Model M with Mac-specific keys and USB) but still have them around.
That will work for most any PS/2 native keyboard.
For older Apple ADB keyboards(small 4 pin connector that looks like an S-Video plug on your TV...it looks like that because that's what it is) the only option I know of is the Griffin iMate. I use one on my Mac Pro at home to connect an old Apple Extended keyboard(orange Alps) to it.
If it's anything other than AT, PS/2, or ADB, good luck. Some manufacturers used proprietary interfaces. Looking around my office, I have a Sun UltraSparc with a 5C keyboard(not a terribly great keyboard IMO, although some people seem to like it) that looks like PS/2 but is proprietary. Similarly, I also have a Silicon Graphics KB with an Iris Indigo that's quite nice with Alps switches(cream) but is also proprietary(my newer SGIs-the Octane and O2-are standard PS/2 and the keyboards are pretty uninspiring and similar to about any other late 90s rubber dome). A few other proprietary ones off the top of my head are the ones for early Apple compacts that use a cable with the same plugs as a telephone handset cable but are wired differently-those have a nice key feel, but are angled steeply and are uncomfortable to me. I bought a Tandy 1000TX a while back, and had to fight to get the keyboard with it-that's a decent enough board, but more importantly even though it looks like an AT connector it's not compatible.