A KVM (Keyboard Video Mouse) Switch is used to use a single set of peripherals with multiple physical machines.
Wikipedia
A KVM switch (with KVM being an abbreviation for "keyboard, video, and mouse") is a hardware device that allows a user to control multiple computers from one or more sets of keyboards, video monitors, and mice.