PID stands for Proportional Integral Derivative - more or less the name we give to three subsets of control methods. Proportional describes the simpest method to implement - the control output is proportional to the difference between the measured value and the setpoint. The greater the difference or error, the greater or lesser the output. Time really isn't a factor. If there is no difference between the measured value and the setpoint then there is no output - or the output doesn't change and stays at some fixed value. The net result is that some systems never actually get to the setpoint value.
Integral control looks at the difference between the measured value and the setpoint over time - and works to correct that difference so that the measured value gets closer to the setpoint.
Derivative control looks at the rate at which the difference is changing. A faster change results in a greater or lesser output.
PID is basically all three of these combined. It is not necessary to employ all three of these at once. P, and PI are common. In the last 20 yrs PID has been easier to implement thanks to modern electronics including microprocessors and microcontrollers.