Magic smoke (also factory smoke, blue smoke, or the genie) is a humorous name for the caustic smoke produced by severe electrical over-stress of electronic circuits or components, causing overheating and accompanying release of smoke. The smoke typically smells of burning plastic and other chemicals. The color of the smoke depends on which component is overheating, but it is commonly white or grey. Minor overstress eventually results in component failure, but without pyrotechnic display or release of smoke.
The name is a running in-joke that started among electrical engineers and technicians. It was more recently adopted by computer programmers. The device operates as long as the magic smoke is trapped inside of it, but when the smoke escapes from it, the device ceases to operate. Ergo, the smoke is an essential part of the device and its operation, through undetermined ('magical') means.