Brushed DC motors are composed of a rotor with electromagnets and a stator with permanent magnets. The following graphics illustrate a simple, two-pole, brushed, DC motor.
Commercial motors have many more coils but they follow this same principle. Controlling such a motor simply requires that a DC voltage be applied to the brushes. Voltage polarity sets the direction. Voltage level sets the speed.
The permanent magnets can be substituted with electromagnets. Motors with electromagnets are called Shunt, Series wound, or Sepex motors depending on their design. Roboteq controllers are best suited for Permanent Magnet DC motors, altough they can be made to work with electromagnet based motors. See this video from Learning Engineering for a visual illustration on how DC Brushed Motors are constructed and work.