A three-way switch is wired with one switch connected directly to the light and a second switch connected to the first switch, allowing for a light to be controlled from two locations. Typically, one switch is connected to power using 14/2 wire, and the second switch is connected to the light. A 14/3 wire runs between the two switches and allows either one to control the light or set of lights.
Three-way switches have two sets of screws or terminals. On one switch, one terminal is connected to the power source using 14/2 wire, while the other terminals connect to the second switch using the red and black wires, often called "travelers." The second switch is not directly connected to the power source but is instead connected to the light fixture. The red and black wires of the 14/3 should be connected to identical locations on both switches.
On the switch connected to power, the white or neutral wires from both the 14/2 and 14/3 are connected; similarly, the neutral wires of the 14/3 and the 14/2 between the switch and the light are connected on the second switch. These connections are typically made with a wire nut, and the neutral wires should be tucked into the back of the electrical box to avoid contact with any other wires.