It is a 5 wire or unipolar stepper motor. It uses 4 windings to produce 2 magenetic fields 90 degrees apart. Sequence of winding power controls step direction. Windings A and B form one pole, and windings C and D form the other pole.
A on C on
A off C on B on
C off B on D on
B off D on A on
D off A on C on <--- we are back to where we started.
Reversing C and D in the sequence will result in counter rotation.
The stepper library handles the sequencing for you. Movement options are by velocity or by step(s). Direction is handled by sign of the velocity or step arguements.
It is actually a five wire stepper motor that can be wire Unipolar or Bipolar.
BiPolar works if you have an H-Bridge driver to connect to the motor.
It will also work if you have 4 transistors, the transistor's collectors to ABC&D, Base to Arduino pins, and emitters to ground, and the power supply to O on the motor, then sequence a, b, c, d for simple stepping, A, AB, B,BC,C,CD,D,DA, etc for 1/2 stepping.