One very cheap and simple circuit to drive a stepper motor consists of 4 darlington transistors + freewheeling diodes. Fortunately there are integrated circuits (ICIntegrated Circuit, also called “chip”) which have all of them together. One of the most popular ICs is the ULN2003 (also ULN2003AN or ULN2003A and many other ULN200x are similarly usable).
This needs four data lines (each for one coil).
Bipolar wiring of a stepper motor requires changing the current flow direction through two coils which can be achieved by two H-Bridges. Each H-bridge has an input to enable / disable current flow and one to determine the current flow direction. This needs 4 data lines.
A very simple method of driving a bipolar stepper is an integrated stepper motor driver. The driver ICIntegrated Circuit, also called “chip” contains two H-Bridges and additional circuitry which gives you a simplified control: Has one input to do steps and a second input determining the step's direction. So only 2 input lines are needed here.
A modern stepper motor driver does much more than just the described above. It also will adjust the current through the coils so the motor is powerful at high and low speeds (to do this for high speed it requires more voltage). Or is able to do so called micro-steps - steps which are between the given physical steps of a motor. Half-Steps means you have twice as much steps, quarter means four times ans much, ...