Simple rice cookers can be built by relying on two principles: that magnets lose magnetism past a certain temperature, and that water can’t get hotter than its boiling point.

Pressing “cook” attaches a lever to the underside of the metal plate on which the pan rests using a magnet. While the lever is in this position, the rice cooker stays in “cook” mode and the heating element operates at full power.

The magnet keeping the lever attached stops being magnetic shortly after the boiling point of water, or just over 100°C.

Since water cannot get hotter than its boiling point, a pan full of water can’t get much hotter than 100°C either. Any excess heat applied to the pan just boils the water off faster instead of heating the pan past 100°C.

Once the water has all evaporated, the pan and the magnet are able to heat up past 100°C, at which point the magnet stops being magnetic and drops the lever, switching it back into “warm” mode.