Electricity can kill, so it is very important to be careful while working with it and to use safety equipment. If you are not competent working around electricity have an electrician do the work.
Do It Yourself - Home Page
A dimmer switch is one of life's little conveniences that, once installed, you
wonder how you ever got along without! Any standard single-pole wall switch is
a good candidate for replacement with a dimmer switch – as long as there's
ample room in its electrical box and the light it's controlling is of the
incandescent persuasion.
Don't try to install a dimmer in an undersized box or one that's already
jam-packed with circuit wires, and never use a dimmer to control a fluorescent
light. All types of dimmer switches have wire leads instead of screw terminals,
so make sure you have the right size wire connectors on hand.
2 Steps
1. Turn off power to the circuit at the main service panel. Use
a neon circuit tester to make sure the power is off. Connect the wire leads of
the dimmer switch to the circuit wires using wire connectors. The switch leads
are interchangeable and can be attached to either of the two circuit wires. If
your dimmer switch happens to have a third (green) wire, this is a grounding
lead; attach it to the grounded metal electrical box or the circuit's bare
copper grounding wire.
2. A three-way dimmer has an additional wire lead. This
"common" lead is connected to the common circuit wire. On a three-way switch,
the common circuit wire is the one attached to the darkest (or copper) screw
terminal on the old switch; it also may be labeled with the word COMMON on the
switch itself. Only one of the pair of three-way switches may be a dimmer
switch; both switches will turn the light fixture on and off, but only one can
control its intensity.