A four-way light switch is a double pole, double throw switch with two positions. In the first position, the electrical contacts are connected straight through so that the switch has no effect on the circuit. In the second position, the switch connects the contacts on the left with those on the right in an X-shaped cross connection. One or more four-way switches are connected between two three-way switches so that flipping any switch turns a light on or off.
Three-way switches are single pole double throw switches used to control a light from two separate locations, typically the top and bottom of a stairway. When both switches are up or both switches are down, the circuit is completed and the light receives power and illuminates. If one switch is up and the other is down, the circuit is not completed and the light is off.
To control a light with three switches, a four-way switch is wired in between two three-way switches. When the four-way switch is down, electricity passes through as if it was not in the circuit. When the four-way switch is up, it changes the state of the circuit by swapping the connections of the hot wire and the neutral wire. If the light was off, it is turned on, and vice versa. Any number of four-way switches may be in series between two three-way switches and each switch turns the light on or off when flipped.