An electromagnet differs from a permanent magnet in the following ways:
1. Electromagnet: An electromagnet is a temporary magnet that requires an electric current to produce a magnetic field. When the current is switched off, the magnetic field disappears. The strength of the magnetic field can be controlled by varying the current or the number of turns in the solenoid.
2. Permanent Magnet: A permanent magnet is a material that produces a magnetic field on its own, even in the absence of an electric current. Its magnetic properties do not change unless it is subjected to external forces, such as heat or hammering.