A three-way switch lets you control one light from two places — top and bottom of stairs, or both ends of a hallway. The wiring is a bit more involved than a standard switch, but understanding it makes replacement straightforward.
How it works
Two three-way switches work together using 'traveler' wires between them. Instead of a simple on/off, each switch changes which traveler is live, so either switch can toggle the light regardless of the other's position. There's also a 'common' terminal (usually a darker screw) that matters for correct wiring.
Replacing one safely
Turn off the breaker and verify the wires are dead. Before disconnecting, label the wire on the common (dark) terminal — getting that one right is the key to a working three-way. Transfer the travelers and common to the matching terminals on the new switch and connect the ground.
When to call an electrician
Replacing a like-for-like three-way switch is doable, but new three-way circuits, smart three-way setups (which need a neutral and compatible switches), or unlabelled wiring you can't trace are jobs for a licensed electrician.