Connect 2pcsto1monitor

I've done with in the past by connecting one computer via the VGA socket and the other via the Digital Video socket and using monitor front panel to switch between them.
 
get something called a KVM switch (Google it), use remote desktop (included with windows XP and up) to remote into the 2nd computer (there are some limitations with this option but not many), or like the previous poster said try to find a monitor that has 2 or more display ports on it.