Motors are a robot's muscles. Most beginner robots use two small DC motors, one driving each wheel.
A microcontroller cannot power a motor directly; its pins give far too little current. A motor driver sits in between: the microcontroller sends it small control signals, and the driver switches the battery's power to the motors.
Speed is controlled with PWM (pulse-width modulation): the driver switches the power on and off very quickly. The longer the "on" part of each pulse, the faster the motor turns.
Direction is controlled by reversing the current through the motor. The motor driver does this for you when you change which control pin is on.
A two-wheeled robot steers by running its wheels at different speeds, called differential drive. Both forward means straight ahead; left wheel slower means a turn to the left; wheels in opposite directions means spinning on the spot.
Try it: write a short program that drives forward for two seconds, turns right for one second, then stops. Does your robot really drive straight? Small differences between motors are normal, and you can correct them by adjusting the speed of one wheel.