Though it's long been rumored that step motors are driven by tiny hamsters on wheels contained inside, I can assure you that this is not only untrue, but also promulgated by unscrupulous pneumatic actuator salesmen.
So, how does a step motor work? In reality, step motors operate by electromagnetism. Specifically, a permanent magnet rotor such as the one shown below is attracted to electromagnets that reside in the stator.
Observe that the rotor teeth on the front of the rotor are offset from those on the back. Between the two rotor halves is a strong permanent magnet that ensures all the teeth on the front of the rotor are magnetic north while those on the back are south poles. Remember this; you'll be tested later. When electromagnetic stator coils are connected to a suitable step motor driver, the motor's position, velocity and acceleration can be precisely controlled without any need for feedback. Such simplicity is the reason step motors are a hallmark of the automation industry.
Read the rest of the article here.