A KVM switch is just an easy way of using multiple computers with the same monitor, keyboard, and mouse. It's really pretty basic - you don't want a bunch of additional keyboards and such cluttering up your desktop, so you plug your monitor, keyboard and mouse (aka periphials) into the KVM, then plug the KVM into both computers. You then press a button to switch between computers.
To figure out what kind of KVM you need, look at the connector on the end of your mouse and/or keyboard, as well as your monitor. A PS/2 connector is round with 4 pins and a small slot to ensure correct orientation. I'm sure you know what a usb connector is, it's the squarish looking one [====] (but smaller).
Your monitor will either be VGA, DVI, or HDMI. Anyway, a VGA connector is a trapazoid with three layers of pins. An DVI connector is a rounded square with many many pins (i'm not sure how many rows).
PS/2: http://upload.wikimedia.org/wikipedia/commons/8/87/PS2_connector_close_up-numbers_%CE%940054b.jpg (very close up)
USB: http://www.crystalfontz.com/products/cables/USB232a/USB_Connector_End.jpg
VGA: http://www.tvone.com/images/1t-vga-cattx-rear.jpg
HDMI and DVI (I think the one on the left is DVI, the right is HDMI, i'm not 100% sure): http://cache.gizmodo.com/assets/resources/2008/01/S-HDMI-DVI-1(2).jpg
Anyway, the only really important things when buying a KVM is to make sure that a) it supports the correct types of connectors and b) it's not a really cheap one. Be aware that you can by adapters for converting one kind of cable to another (VGA->DVI, USB -> PS/2, etc). I've had really bad luck with cheap KVMs.
Anyway, you can buy them at any halfway decent computer store. Fries, BestBuy, newegg.com, etc. They're not particularly rare.
There is one variation on the KVM - there are devices called KVMIPs that you can log into and use remotely. There are cheaper ways of giving yourself this kind of functionality.