Here are the steps to wire a dimmer switch:

1. Turn off the power on the main circuit switchboard.
2. Remove the screw covers.
3. Double check the wires are not live.
4. Draw out your wire setup.
5. Identify and tag your wires.
6. Release the wires from the switch fitting.
7. Re-wire the new switch.
8. Set the brightness level.

Here is a more detailed guide on how to install a dimmer switch safely . I hope this helps!