1. Why a motor can't run from a pin
Try firstWhy can't you run a motor from an Arduino pin, and what do you use instead?
Check your answer
A pin gives about 20 mA and a motor needs hundreds. The pin switches a transistor or motor driver, which switches the motor's own battery.
A pin is a signal, not a power supply. It can give about 20 mA (40 at most), and a small motor needs about 150 mA turning and 700 mA starting. So the pin switches a transistor, and the transistor switches the motor's own battery. A motor is a coil: switching it off makes a voltage spike, so a diode across it gives the spike a safe path.



