An electric motor is a device for converting electrical energy to mechanical energy. This is accomplished with the interaction of two magnetic fields. One field originates from the stationary portion of the motor, refered to as the stater. The second magnetic field originates in the rotating portion, refered to as the armerture. The simplist form of an motor can be constructed by hanging a bar magnet from a string. The magnet is supported in such a way as to have the north and south poles horizontal and evenly balance by the string. This is the motor's armerture. Bringing the same magnetic pole of a second magnet near the armerture magnet can cause the first magnet to rotate. With a little practice, the hanging magnet can be made to rotate for a period of time.
Electric powered motors operate on the same principle, but are driven my many differing electrical and magnetic arrangments. Either one or both of the magnetic poles are replaced with electromagnets. A simple electromagnet can be fabricated be wrapping a current carrying wire around an iron rod. This can be used to replace the stater magnet in the experiment described above.
Motor controllers are used in place of your hands in turning on and off magnetic fields in order to get the motor to rotate at a spicific speed and torque. Each type of motor will have its own type of controller. Some motors will accept different types of controller, achiving different amounts of effeceincy or power.