Please tell me how the interrupts work on the Arduino Uno and related boards with the ATmega328P processor.
The processor datasheet has a whole section on interrupts, and can be downloaded from Microchip's website.
You can find a good explanation here: Gammon Forum : Electronics : Microprocessors : Interrupts
This article discusses interrupts on the Arduino Uno (Atmega328) and similar processors, using the Arduino IDE. The concepts however are very general. The code examples provided should compile on the Arduino IDE.