A permanent magnet is a solid material that produces its own consistent magnetic field because the material is magnetised. 

Unlike permanent magnets, the magnetic field exerted by an electromagnet is produced by the flow of electric current. 

The magnetic field disappears when the current is turned off.

Typically, an electromagnet consists of many turns of copper wire which form a solenoid.

When an electric current flows around the solenoid coil, a magnetic field is created. 

If an iron core is inserted into the bore of this solenoid, then magnetism is induced into it and it becomes magnetic, but immediately becomes nonmagnetic when the current stops flowing.