The I- (integral) term (also called integral control) is the PID controller's “memory”. While the P-term exclusively looks at the current error, the I-term looks at the past by summing the error over time.
Its primary – and absolutely most important – task is to eliminate the permanent residual error (offset) that the P-term leaves behind.