The rotor of a stepper motor is made of a heavy piece of gear-shaped
soft iron. This is surrounded by field coils that have toothed cores.
When one of these coils is energized the teeth on the rotor will line
up with the teeth on the coil. Each field coil is aligned slightly
differently so that the rotor will have to rotate slightly to line up
with it. The following diagrams are a simplified illustration.
Field coil 1 is energized. The teeth of the rotor line up with the teeth of the coil.
Field coil 2 is energized. The rotor teeth near it line up with its poles. This moves the rotor one step to the right.
Field coil 3 is energized moving the rotor another step to the right.
Field coil 4 is energized moving the rotor to the next step
Stepper motors are typically driven by computers, microcontrollers or other digital equipment.