A three-way switch is a type of electrical switch that allows you to control a single light or set of lights from two different locations. It is commonly used in hallways or large rooms where you want to turn the lights on or off from either end. In a three-way switch setup, two switches are connected to the same light fixture, enabling this dual control functionality.