Sense, compute, correct, repeat
In the first course of this track you saw the conceptual difference between open-loop and closed-loop control, a closed-loop system checks its own results and adjusts, an open-loop system just fires off a command and hopes. PID control is the most common concrete implementation of that closed loop. At every tick, a controller reads a sensor to find out where the system currently is, compares that to where it should be, and computes a correction, then applies that correction to the motor or actuator. This cycle repeats dozens or hundreds of times per second, so even though each individual correction is imperfect, the system converges on the target through rapid, repeated adjustment rather than one perfect calculation.
The quantity that drives everything is the error, defined simply as the setpoint (where you want to be) minus the measured value (where you actually are). A robot arm trying to hold a joint at 90 degrees but currently sitting at 85 degrees has an error of 5 degrees. Everything a PID controller does is some function of this error and its history, it does not need a model of the robot's mass, friction, or motor characteristics to work, which is a big part of why it's so widely used.
