Here are the steps to replace a light switch:
1. Turn off the power to the room where you will be working by cutting power to the electrical panel.
2. Remove the faceplate of the switch.
3. Unscrew the wires from the terminal screws of the old switch.
4. Cut the wires attached to the old switch.
5. Carefully strip about 1/2 an inch of insulation off of the wires.
6. Connect the ground wire to the green grounding screw on the new switch.
7. Hook the hot wires to the gold terminal screws.
8. Screw the switch and switch plate back on the electrical box.
9. Turn on the power to test the switch.
I hope this helps! Let me know if you have any other questions or if there is anything else I can help you with.
[Here](https://www.wikihow.com/Replace-a-Lamp-Switch) is a link to a more detailed tutorial with pictures that might be helpful for you.