Turn off the electricity at the main breaker panel for the garage circuit. If you are not sure which specific circuit the switch will be on, shut down the large, main switch providing electricity anywhere to the house.
Open the wall plate and pull out the three wire cables. There should be a black wire, white wire and green or copper-only wire. The white wire continues to the lamp, fan, garage door or other appliance that the switch controls, and you will not do anything with it.
Cut black and green wires at the middle point from where they enter and exit the circuit box so that there are equal amounts to work with. Remove the insulation from the black and green wires so that about 3/8-inch of copper wire is exposed. New-style switches have simple "push-in" connectors for the exposed black wire. Set one end of the black wire coming into the circuit box into the wire into the connector and screw it down. Set the other end into the other connector and screw it down. Take both ends of the green or copper wire and set them into the switch ground connector, which is labeled and on the opposite side of the black wires. Screw them tightly into the connection.
Screw the top and bottom of the switch to the circuit box and turn on the power supply at the main breaker panel. Test the light switch. If it works, put the faceplate back on.