Reacting to the rate of change
Where the proportional term reacts to how large the error is and the integral term reacts to how long it has persisted, the derivative term reacts to how fast the error is changing, scaled by a gain Kd. It's computed as the difference between the current error and the previous error, divided by the time between measurements, which is just the slope of the error over time. A large derivative means the error is closing fast, a derivative near zero means the system has nearly stopped moving relative to the target.
This gives the derivative term a kind of predictive quality. If the error is shrinking rapidly, that's a signal the system is about to reach, or overshoot, the target very soon, and the derivative term produces a correction that pushes back against that fast motion before it becomes a problem, rather than waiting for the overshoot to actually happen and then reacting to it afterward.
