Microcontrollers interrupts what is "pending"?
Most micro-controllers work in the following way: a flag (bit) is set in a register when a particular event occurs in the peripheral (e.g., in your case, a timer match occurs). This flag must be cleared by the application software when they have handled the event. If the software has enabled the interrupt, the interrupt service routine (ISR) is called as soon as possible when the flag is set (usually immediately, but maybe not if another interrupt is being serviced).

In most cases, it is not necessary to check that the flag is set within the ISR, because the fact that the ISR is executing means the flag must have been set. However, in some cases an ISR can be associated with multiple flags, and therefore it is necessary to test each flag in turn to determine which events have actually occurred. Because of this, it is often considered best practice to always test the flag within the ISR, even when it's not strictly necessary. This is what the "pending" call is doing: checking if the flag is set. The following "clear" line then clears the flag if it was set.