In a normal brushed DC motor, voltage is applied to terminals which in turn causes a wire coil to rotate at speed inside a fixed magnet housing (the ‘stator’).
In this setup, the spinning wire coil (the ‘rotor’) effectively becomes an electromagnet, and turns rapidly at the centre of the motor based on the familiar principle of magnetic attraction and repulsion. A combination of brushes (electrical contacts) and a rotary electrical switch known as a commutator allows the direction of the current running to the wire coil to be alternated quickly. This creates continuous unidirectional spinning of the rotor coil for as long as the assembly is being fed with sufficient voltage.
A potential downside of this type of motor is that it spins continuously and for an arbitrary number of rotations until power is cut off. This makes it very hard to control the exact stopping point of the motor, rendering it unsuitable for applications requiring greater precision control. Manually controlling the on/off flow of power to the motor can’t give you the required start-stop precision for performing minutely accurate movements.
In a stepper motor, the setup is quite different. Instead of a wire coil rotor spinning inside a fixed housing of magnets, stepper motors are built with a fixed wire housing (the stator in this case) arranged around a series of ‘toothed’ electromagnets spinning at the centre. The stepper motor converts a pulsing electrical current, controlled by a stepper motor driver, into precise one-step movements of this gear-like toothed component around a central shaft.
Each of these stepper motor pulses moves the rotor through one precise and fixed increment of a full turn. As the current switches between the wire coils arranged in sequence around the outside of the motor, the rotary part can complete full or partial turns as required, or it can be made to stop very abruptly at any of the steps around its rotation.
Ultimately, the real strength of a stepper motor versus normal DC brushed motors is that they can quickly locate themselves to a known and repeatable position or interval, and then hold that position for as long as required. This makes them extremely useful in high-accuracy applications such as robotics and printing. Learn Engineering have created the below video that demonstrates how a stepper motor works: