A non-maskable interrupt (or NMI) is a special type of interrupt used on in most types of microcomputer, for example the IBM PC and Apple II.
An NMI causes the CPU to stop what it was doing, change the program counter to point to a particular address and continue executing code from that location. Programmers are unable to program the CPU to ignore these interrupts, hence the term "non-maskable".
In practice, NMIs are particularly useful for two reasons.
One is for debugging faulty code, where it can be instantly suspended at any point and control transferred to a special monitor program, from which the developer can inspect the machine's memory and examine the internal state of the program as it rests in "suspended animation". The Apple Macintosh's "programmers' button" worked in this way, as do certain key combinations on SUN workstations.
A second is for leisure users and gamers. Devices which added a button to generate an NMI, such as Romantic Robot's Multiface, were a popular accessory for 1980s 8-bit and 16-bit home computers. These peripherals had a small amount of ROM and an NMI button. Pressing the button transferred control to the software in the peripheral's ROM, allowing the suspended program to be saved to disk (very useful for tape-based games with no disk support, but also for saving games in progress), screenshots to be saved or printed, or values in memory to be manipulated -- a cheating technique to acquire extra lives, for example.
Some floppy disk interfaces, such as the Miles Gordon Technology's DISCiPLE and PlusD for the ZX Spectrum, also included an NMI button.