Turn off the breaker switch for the light switch at the breaker box before attempting to hook up the wire to the light switch. Remove the cover plate off the electrical switch by unfastening the screw with a screwdriver and setting the plate out of the way.
Unfasten the screws that are securing the lightswitch to the electrical box with a screwdriver and pull the lightswitch forward so you can access the screws on the side of the switch. Loosen the screws on the side of the switch and take the electrical wires off the lightswitch.
Set the light switch out of the way and fasten the black (hot) wire to the brass terminal screw of the new light switch with the screwdriver. Secure the white (neutral) wire to the silver terminal screw and attach the copper (ground) wire to the green terminal screw on the new light switch with the screwdriver.
Set the light switch back into the electrical box and secure the new switch with screws to the electrical box. Place the cover plate back over the light switch and secure it to the box with screws.
Flip the breaker switch back on for the light switch at the breaker box.