A typical three-way switch has three terminals: one connecting to the power source and two to represent "on" and "off." A four-way switch has an extra terminal so that it may be connected to other switches, allowing a light to be turned on and off from other locations.
Two adjacent terminals on a four-way switch must both be connected to another switch in order to make a complete circuit. Any number of four-way switches can be connected to each other this way, creating a chain of working switches.
Wiring a four-way switch arrangement requires precise connections at each terminal. This should not be attempted without extensive knowledge and training in electronics.