A stepper motor is a very magical motor. That is because it works through electromagnetism. The shaft of the motor is mounted with a series of copper coils and magnets. The copper coils are charged by an electric current in a sequence in order to activate and deactivate the magnets. These forces of attraction and repulsion work to spin the motor!
Arduino is great for controlling stepper motors! You can control speed of rotation extremely accurately in the code and with sensors!
Here is a great guide including code for stepper motors!