Turn the electrical power off to the ceiling fan circuit.
Remove the existing wall cover plate and light switch, and extract the wires from the wall box and separate them. There will be a black wire, a white wire and a bare copper wire.
Position the new dimmer switch beside the wall box and connect the circuit wires as follows: attach the white wire from the wall box to the white wire using a wire nut or silver screw pole on the dimmer switch, and then connect the black wire from the wall box to the black wire using a wire nut or brass screw pole on the dimmer switch. Finally, attach the bare copper ground wire from the wall box to the green wire using a wire nut or screw pole on the switch and tighten all the connections with a screwdriver.
Push the connected circuit wires and dimmer switch body into the wall box and secure with the two flange bolts provided.
Install the new cover plate over the dimmer switch and secure with the two small screws provided. For knob-type dimmer switches, attach the dial knob by sliding it onto the center control stem.
Turn the power to the ceiling fan circuit on at the main electrical panel.