A stepper motor is controlled by sending electrical pulses to its windings to cause incremental rotational movement. There are different types of stepper motors that have varying numbers of windings and step angles. An AVR microcontroller can be used to control a stepper motor by outputting stepping sequences to a motor driver chip, like a ULN2003, that amplifies the current to drive the motor windings. The document provides examples of stepping sequences, step angles, and code for rotating a stepper motor connected to an AVR.