If you want one computer connected to each display: you can use a software like Synergy to share one keyboard and mouse between the two.
If you want one computer connected to both displays, one at a time: the easiest way is to just run two cables to each monitor utilizing the multiple input ports. For convenience, you can get a display switch.
If you want to swap what is displayed on a mixture of displays, you can use a display "matrix". This will allow you to have multiple inputs an swap them from monitor to TV etc.
A display splitter will duplicate what is sent from your computer to two different displays, showing the same image twice.
A KVM is the holy grail and will switch both your USB devices (keyboard mouse) and multiple monitors from one computer to another, but they are much more expensive. They are also becoming more rare as data throughputs are getting higher, and most industries are switching over to softwares like Remote Desktop or VNC, instead of KVMs.
It can be very difficult to find something that fits your exact set of computers and monitors, but hopefully knowing some of the terminology will help.