To wire a basic light switch, turn off the power to the switch at the breaker, pull the wires to the switch out of the wall, connect the wires to the screws on the sides of the switch, and screw them down with a slotted screwdriver. Finally, test the switch.
To work safely, turn off the power to the switch at the breaker box. Next, remove the switch plate if there is one, and examine the wires in the switch box. There may be two wires, one black and one of any color except green. Alternatively, there may be three wires, including a green one.
The hot wire, which carries the power into the switch, is black. Using a slotted screwdriver, unscrew the top screw on the switch, and then hook the black wire around the post. Screw the wire down, making sure the black wire remains wrapped around and in contact with the post.
Unscrew the other screw on the switch, attach the other wire, and screw it down. Depending of the type of switch you’re wiring, you might also have to connect a ground wire. Turn the power back on at the breaker, and test the switch. Finally, screw on the switch plate.