How does an interrupt handler work in a computer?

An interrupt is a signal to the processor emitted by hardware or software indicating an event that needs immediate attention. Whenever an interrupt occurs, the controller completes the execution of the current instruction and starts the execution of an Interrupt Service Routine (ISR) or Interrupt Handler.
For More Information Please Refer:
https://www.quora.com/Why-do-we-need-an-interrupt-in-an-embedded-system
You May Also Like to Read: