How to connect the motor to the Arduino?

Connecting a motor is a fairly uncomplicated process, but to avoid mishaps or even damage to the equipment, it is worth knowing the theoretical basics beforehand.