How to control and set 1 computer to work with 2 keyboards 2 mouse and 2 monitors?

You can purchase a switch box that allows you to switch control.