It detects and controls the rotational speed of the motor. When lower than the specification speed, it increases a control electric current.
http://www.hobby-elec.org/e_pic6_9.htm
The Lego motor is controlled using a feed back mechanism to influence the pulse width modulation.
http://members.home.nl/b.vandam/lonely/pagina21.html
This is a circuit for controlling the speed of small DC motors, it works nicely as a speed controller for an HO or N gauge model railroad.
http://www.solorb.com/elect/pwm/index.html
The circuit described here is for a general purpose device that can control DC devices which draw up to a few amps of current.
http://www.solorb.com/elect/solarcirc/pwm1/index.html
This circuit is designed for 24V-dc up to 2.5A motor that comes with a worm gear.
http://www.edn.com/article/CA193190.html
PIC16C84 circuit accepts control words from an 8-bit digital bus and controls motor
http://www.edn.com/archives/1998/091198/19di.htm
http://www.robotics.com/motors.html
controls a small DC motor to two directions at variable speed using normal RC servo control pulses
http://www.mcmanis.com/chuck/robotics/projects/servo.html