The iconic Intel 8086 processor (1978) set the path for modern computers. Like most CPUs, it supports interrupts, a mechanism to interrupt the regular flow of processing. I've been reverse-engineering it from the silicon die, and I can explain how its interrupt circuitry works.
The interrupt circuitry is implemented both in microcode and hardware. Microcode is a layer between machine instructions and the hardware, executing low-level 21-bit micro-instructions. These perform moves, combined with several types of actions: ALU, memory, jumps, etc.