Electromagnets are temporary magnets created by passing an electric current through a coil of wire, often wound around a soft iron core. Unlike permanent magnets, their magnetic field can be controlled, allowing them to be switched on or off, and their strength and polarity adjusted. This controllable magnetism makes them indispensable in various technological applications.