Can you explain the purpose of an interrupt in a microcontroller? How are interrupts implemented?