This article will not only provide step by step instructions on the basic wiring of a switch, but it will also provide a fundamental explanation of how it functions. It is important to note that this is the most basic way to wire a switch. There are other circumstances which may require different wiring methods, however once the knowledge of the most basic wiring is gained it makes it simpler to understand more complex methods.
A switch is essentially a point in an electrical circuit which (if in the off position) does not allow the current to continue its flow onwards throughout the circuit. A switch requires a conductor providing power (line) and another conductor to continue the current's flow into the respective device it is controlling (in most cases a light) which is known as the load.
Before wiring any electrical device it is important to remember: DO NOT WORK ON LIVE CIRCUITS. Check for live current with a voltage tester which can be purchased at most hardware stores.
In most cases the switch box will have 2 black wires and 2 white wires in them. 1 of the black wires is the line wire and that will be the one that carries the current to the switch. During the rough-in phase of electrical installations it is common to identify the line wire by stripping a small portion of the tip once it is in the device box, however if it is not stripped it can be identified by any number of means.
Some ways include: tracing the wire by eye to see which one leads from the panel and which is directed towards the load, turning on the breaker at the panel (assuming the wire is connected) and checking which one becomes live at the switch box, checking for continuity with a multi-meter (assuming one is available). It is not really necessary to identify which wire is line or load in this instance but it is still useful to know which is which for other applications.
Before wiring the switch you will need a few tools and materials: linesmen pliers, side cutters, wire strippers, and a red Robinson as well as a green Robinson (square head) screwdriver. You will also need 1 wire connector (commonly known as marrettes in the electrical trade).
If you are looking at a switch box, and there are two 2-wire Romex cables cut into it then you are ready to wire the switch. Once again make sure the wires are not live, check for voltage and if they are live turn off the circuit from the electrical panel. Take the bare copper wire (known as the ground). Wrap them around the screws in the back of the box (ground screws) and use your red Robinson screwdriver to tighten the screw. Next wrap one of them around the green screw on the switch, use your green Robinson to tighten the screw. With the side cutters, cut the other copper ground wire close to the screw but make sure it is wrapper around its ground screw and tightened securely as well, this will insure that the device box is in fact grounded. Should a problem occur, it will cause the breaker to trip which could prevent a potential electrical fire.
Take the two white wires (also known as neutrals) strip about 3/4 of an inch off the tips with the wire strippers, twist the exposed copper together with the linesmen pliers, and cap this connection or junction with a marrette. Tuck the connected whites into the box as far back as possible insure enough room for the actual switch device.
Most 120 volt single pole switches have 2 brass screws on the right side, please make sure that the switch is in fact "right side up" when installed or else flipping it down will be "on" and flipping it up will be "off" (this is counter-intuitive and just not commonly accepted). Strip the two black wires then wrap the exposed copper of one around one brass screw and the exposed copper of other wire around the other brass screw. If you wrap both around the same brass screw they are in contact and the circuit will be constant defeating the whole purpose of this switch. So make sure the two black wires are on separate screws. Once they are wrapped around tighten the screws with a green Robinson screwdriver. Note to save time some switches have inserts on the back of them to avoid having to wrap the copper around the screws.
Once this is completed it is also good practice to wrap electrical tape once around the switch covering the screws to help prevent contact with the metal of the box. Screw the switch into the box (usually the screws are already on the switch and it is just a matter of lining them up with the holes at the top and bottom of the box). Tighten it securely but don't over tighten it. Finish off by covering it with a switch plate, turning on the circuit from the panel, and then see if it works by physically flipping the switch. If the lights (or whatever the load is) turn on then it is wired correctly. Congratulations you have just successfully wired a switch.