Recently when I was cooking in my home, some of the food spilled over from the vessel and came in contact with the heating element giving rise to a dense smoke with the smell of burnt food like charcoal! Then the alarms inside our house went off! After a while,the smoke left the building through the windows and the alarms became quiet again.
I was curious to understand how these alarms worked. A quick google search led me to two different types of alarms – ionization vs. photoelectric.
A nice video of how it works: