Light switches are designed to last for years, but not forever. The internal toggle mechanism isn't fragile, but repeated use can eventually wear out the connections, and when that happens, it won't do its job. The usual result is that the circuit remains permanently disconnected, but it's also possible for the opposite to happen, and the lights may stay on. There's no need to try to repair a defective switch -- you can buy a new one for a few dollars, and replacing the defective one is an uncomplicated job.
Testing and Replacing the Switch
Turn off the power.
Go to the main circuit breaker and turn off the breaker controlling the switch. If you don't know which one it is turn them all off one by one until the lights go out.
Expose the switch terminals.
Unscrew the switch cover plate, using a flat-head screwdriver. Double check that there is no power to the circuit with a non-contact circuit tester. Unscrew the switch from the electrical box, using a Phillips screwdriver. Grasping only the top and bottom extensions of the switch -- by which the screws were holding it to the box -- pull the switch out until you can see the terminals on the side.
Test the switch.
Note the white wires in the box; you should see two or more twisted together and capped. Unscrew and remove the cap, then turn the switch off and the breaker back on. Test the switch by placing one lead of a voltage tester on one of the brass terminals and the other lead on any of the white wires. The tester should register 120 volts. Move the lead that's on the brass terminal to the other one. If you still get a voltage reading, the switch is indeed bad. If you get no voltage reading, the switch is doing its job, and the problem is faulty wiring. At this point, you may want to call an electrician.
- Turn off the breaker and pull the switch out of the wall.
- Double check the terminals with the voltage tester to make sure there's no power; at this point, you can replace the cap on the white wires.
- Unscrew the screws from the two brass terminals and -- if there is one -- the green one on the bottom of switch and unhook the wires.
- Replace the wires on the terminals of the new switch in the same configuration and tighten the screws to hold them, then push the switch into the electric box and fasten it with the screws provided.
- Screw on the cover plate and turn on the power.