A stepper motor does not rotate continuously like a conventional DC motor but moves in discrete steps.
If you count the steps, you’ll know the position of the motor-shaft without needing extra sensors. Another advantage of a stepper motor is its ability to hold position. In other words, the shaft can stand still. Even in this situation the motor can deliver torque, so it can be used as a handbrake (the controller boards and motor might get hot though). So stepper motors have a large torque at low speeds, even at 0 RPM. And they are useful in applications where you want to keep track of the position of the motor shaft.
The rotor (the part that rotates) consists of a magnet with many poles. You can check the video via the external link. The stator (the standing part, that doesn’t rotate) contains coils to develop a magnetic field that helps the rotor to rotate in the desired direction. By actuating the motor coils one after the other the shaft moves step by step, in either direction.
A characteristic feature of this motor is the angular rotation per step, given in degrees. A stepper motor with an angular rotation of 1.8 degrees per pulse needs 200 (360 / 1.8) steps to make a full rotation. Another one is the motor voltage and current, resulting in a certain maximum delivered torque.
Unipolar vs Bipolar:
Unipolar: 6 leads, needs only 4 transistors (1 per wire, minus 2 common wires) to drive the motor.
Bipolar: 4 leads, driver is an H-bridge to change polarity of each winding.
A typical driver for stepper motors is the ULN2003, containing 7 transistors, or the L297/L298, containing 2 H-bridges. But also many different stepper driver boards are sold nowadays. These boards contain a driver chip and some extra components to directly interface between a micro-controller board (e.g. Arduino) and a stepper motor. As input these boards usually need a ´step´ and ´direction´ signal. Important here is that both your micro-controller and the driver board work with 5 Volt signals or 3.3 Volt control signals. On the output of the driver you connect the stepper motor windings.
Notice that driver boards mostly have a separate connection for the motor voltage named like Vm or Vmot. This is because the 3.3 or 5 Volt, needed for the logic, is often not powerful enough for the motor. Typical motor voltages are 12 or 24 Volt. On some boards the supply voltage for the logic is derived from the motor voltage. But most boards will have a separate 3.3 or 5 Volt connection (named like Vcc or Vdd).
Some driver boards get damaged when you disconnect the motor from the board while it is in operation. So first switch off the power.
If the shaft slips you loose track of the position. This happens when the load torque is bigger than the holding torque.
Half-step and Micro-step:
When a rotation of 1.8 degrees is not fine enough, a different motor can be chosen, or you can use a driver that supports half-step or micro-step. Resulting in smoother operation.