Lightning hitting magnetite turns it into lodestone. Heating up a magnet causes it to lose its magnetism. Running a current through a coil was a new way to make a magnet. In addition, you could turn this magnet off and on at will. You could also vary its strength by varying the current.
Many electric switches work from the electromagnet principle.
Current is put into a coil of wire, it generates a magnetic field. This pulls a switch, which has a piece of steel, or something attached to it that is magnetic. The switch is under tension so once the electromagnet is turned off, it then springs back to its original position. The thermostat works this way. The thermometer signals when the temperature is too low and the electromagnet is turned on.