What is a Stepper Motor?
Stepper motors, unlike ordinary DC motors, are brushless and can divide a full 360° into a large number of steps, for example 200.
Synopsis
In robotics, stepper motors are widely used. They offer amazing precision as well as continuous rotation. Also, any inaccuracy between steps are non-cumulative; 200 steps will always be 1 revolution. These features make them ideal for driving the wheels on a robot, and creating linear motion using a leadscrew. The drawbacks are that they require current when not moving they are relatively expensive and they are quite heavy for the amount of torque they give.
How they work
Stepper motors come in two main types – Variable Reluctance and Permanent Magnet.
Variable Reluctance (VR)
The upper electromagnet is activated and the teeth of the central cog line up accordingly.

The upper electromagnet is deactivated and the right one turned on. The closest cog teeth then jump to line up with this. This causes a step (e.g. 1.8° turn).

The right electromagnet is deactivated and the lower one is turned on. The cog teeth then jump to line up with the bottom electromagnet. This causes another step.

The bottom electromagnet is deactivated and the left-most one turned on. The cog teeth then jump to line up with this. This causes another step. On a motor which has a step angle of 1.8°, 200 steps are required for a full rotation.

Permanent Magnet (PM or tin-can)
Works in a very similar way to the VR type, but the rotor is radially magnetized.