Pulse-width Modulation is a form of output in which a source is switched on and off for a time in a fixed period. PWM is used to achieve an output similar to that of an analog output. One such example is the Arduino board. To have a dim LED, the Arduino switches its output on and off for a duty cycle over (I believe) 2 ms. This switches so fast it appears to the human eye as a dim LED.