I hooked up two computers to one monitor: one via DVI, the other via VGA.
I switch between the two displays by pressing a button on my monitor.
I share the same mouse/keyboard between both computers with a program called Magic Mouse. It lets you move across both computers as if they were a single desktop. You can also change the input focus to a single computer or up to four computers simultaneously with keyboard combinations. It might be an internal Microsoft tool; I will check if it's available outside MS. I know there are other similar programs, though.
Also another cool feature of Magic Mouse is that it lets you share clipboard contents across the different computers!
I stopped using a KVM because the one at work only supported PS/2 mice/keyboards.