Turn off the power to the switch at the breaker box. If you cannot identify which breaker controls the switch, turn off the main power switch.
Identify the wires. The hot wire will be cut with two stripped wire ends ready for connection. The hot wire usually has black insulation, but may be another color. No matter what the color, the two hot wire connectors will have the same insulation color. The ground wire is either insulated with a differing color, or not insulated at all.
Locate the connector screws on the switch. On one side of the switch there will be two connection screws for the hot wire. The other side of the switch has a single connection screw for the ground wire.
Connect the wires. Curl the bare ends around the posts of the connection screws in a clockwise direction. Tighten the screws firmly, with a slotted screwdriver, causing the curls in the wires to close together.
Set the switch in the wall and screw in the holder screws with a Phillips screwdriver. Leave the switch plate off until checking the job.
Restore power with the switch turned off. Turn the switch to the on position and make sure it controls the intended electrical device.
Replace the switch plate cover. If the switch is working properly, fasten the two screws on the switch plate with a slotted screwdriver.