Interrupts allow a microcontroller to pause its current task and execute an interrupt service routine (ISR) in response to an event. Common events include timer overflows and external pin changes. Each interrupt has an associated flag bit and enable bit that allow the interrupt to be triggered and responded to. Timers can generate interrupts and also be used for pulse width modulation to create analog outputs from digital signals.