In Arduino, when an interrupt happens, the main program pauses and runs a special function called ISR (Interrupt Service Routine). The ISR should be very short and fast to avoid delaying the main program. Variables shared between ISR and main code must be declared volatile so the main code always sees the latest value. Functions like delay() or Serial.print() should not be used inside ISR because they are slow. After ISR finishes, the main program resumes where it left off. This example shows an interrupt on pin 2 that increases a count variable each time the pin signal rises. The execution table traces how the count changes and when the ISR runs. Remember, keeping ISRs quick and using volatile variables are key best practices.