Your kettle switches itself off because of its own steam. Early electric kettles had no idea when they were done. They just kept boiling, filling the kitchen with steam, until somebody noticed and switched them off.
In 1955, in Croydon, Bill Russell of Russell Hobbs designed a kettle called the K1. It was described as the first kettle that switched itself off.
Here's the weird part. The kettle doesn't need to know the water is boiling. The steam tells it. When the water boils, steam is pushed through an opening and led onto a small strip at the back of the kettle.
That strip is made of two different metals bonded together. When they get hot, one metal stretches more than the other. One side grows longer than the other side, so the whole strip has to bend. As it bends, it knocks the switch. Click. The kettle is off.
It's a lovely bit of design, because it uses the very thing the kettle makes to stop the kettle. No clock, no thermometer to read, nobody standing over it.
An early Russell Hobbs kettle from about 1955 is now in the collection of the Science Museum Group.
Most kettles today still work on the same idea: a steam-operated strip of two metals, plus a separate cut-out in case one boils dry.
So the next time your kettle clicks off while you're getting the mugs out, that's its own steam doing the job.