How A Dimmer Switch Works
Most homes have lamps or fixtures that can be made brighter or dimmer by rotating or sliding a control on their on-off switch. Years ago this was done using a device called a rheostat--a large variable resistor. This method wasted electricity and generated a lot of heat. To control the amount of energy going to the light the rheostat had to throw a lot away, turning it into heat. For example, at half brightness a 100 watt bulb would waste about 20 watts to heat in the rheostat.
Modern dimmer switches work an entirely different way. They use a transistor like device called a TRIAC to switch the electricity on and off very rapidly--120 times each second. Because they sort of 'chop up' the electrical power this way they are sometimes called 'chopper switches.'
One cycle of household 60 hertz or 60 cycle AC electrical power is shown in the figure. (Hertz means cycles-per-second and AC means alternating current.) It's called alternating current because, for one-half of the cycle (1/120 second) it's positive and, the other half it's negative or, half the time it's flowing one way and half the other. And, as you see from the curved shape, it doesn't change suddenly. It rises and falls or, undulates.
The red line indicates the point in each half-cycle that the dimmer switch turns on. It turns off each time it reverses direction/sign/polarity, that is, each time it crosses the blue line. The rotating or sliding control on the switch moves the red line left and right. As the line moves to the left the light is on more of the time and thus, brighter. As the red line moves to the right, the light is on less and less of the time and thus gets dimmer and dimmer. Said another way, the area labeled "on" represents the total power/voltage going to the light and as the red line moves to the right this area gets smaller.
Actually the knob or slider is also a variable resistor but, in this case it's just used as a signal to move the turn-on point (red line)--it's not redirecting the flow of current as the old time rheostat was. With the dimmer circuitry very little energy is wasted. A typical modern dimmer control is more than 99 percent efficient--less than 1 watt is wasted controlling a 100 Watt bulb.
Variable speed tools and electric motors are controlled using the same principal. They're sometimes called "chopper switches" and their on-off pattern may be different. When using the old rheostat method to control motor speed, reducing speed also reduced the force the tool could apply. With the chopper switch force is maintained while reducing speed.
NOTE: Tony Miklos <firstname.lastname@example.org> asked me to tell you not to be misled by the high efficiency of dimmers. Though using them causes bulbs to last much longer it also results in great inefficiency in light output per watt from the bulb itself.