This is basically a “Common or garden” motor. It might be referred to as a “Fixed Magnet DC Motor” as there are other motors which run on DC - this is just what is commonly meant when people simply say a motor or DC motor.
It is operated by a Direct Current and rotates in a direction set by the polarity of the current.
The basic design of a DC motor requires an outer stator, a holder for the rotor axle, and brushes to pass electricity to the rotor.
The rotor - rotating part has at least three electromagnets(more mean smoother operation) around a central axle. The central axle also has a small ring with three(or more) contacts known as commutators (see title below). As the motor rotates - the brushes on the stator connect with the commutator - and the motor changes polarity when the motor has turned - so the electromagnets polarities will change - this will attract them to the other stator magnet.
The demonstration two electromagnet design is simple, and has limited efficiency and stability - professional motors are often a great deal more complex than this.
Carbon is commonly used to lubricate the brushes on the commutators - as it is conductive (under some circumstances) while also being fairly hard wearing and not as messy as oil.
A DC motor or generator commonly has a static/stationary set of two or more permanent magnets or coils - these are referred to as the stator.
Depending on their design, they may actually be on the inside, or the outside of the motor.
Commutators are the curved copper plates around the armature of a DC Motor - with insulating material between them. They are also used in Generators, and some older switching systems(though those may have been replaced by solid state gear).
These plates are in contact with the brushes which allow them to transmit power from the source to the coil windings.
In a DC Motor, as the commutators move past the brushes their polarities change, therefore changing the polarity of the magnetic fields of the coils.
If you want a simple direct control system, you may wish to consider Servo Motors instead.
When using DC motors with more complex control circuits, you may observe erratic or difficult to control behaviour. This is due to one of two factors.
If you are using motors on a device with ultrasonic sensors, the motors may also introduce a great deal of high frequency vibration - it is worth considering using suspension or damping foam around the Ultrasonic transducers to ensure it does not interfere with them.
Standard DC motors are in no way geared, and this may mean that their output may be too fast with very low torque. You should probably gear them down a few times. This may be your problem if you attached your wheels directly to the motor shaft.
Lego have both geared, and non-geared motor varieties.
Time to build your own robot! Using a Raspberry Pi with parts and some time, you can use my book to learn how to make and program a robot with automatic behaviours.