A magnet is called as a 'permanent magnet' . It is naturally occurring and can be manufactured as well. I think samarium cobalt is the permanent magnet having maximum coercivity. Permanent magnets are mostly used in the applications when a mid range constant magnetic flux is needed or sufficient. These applications include poles of mid range dc or bloc motors, magnetic lifters to lift magnetic object of weight than can be as high as few tones. Electromagnets are made by winding an insulated wire with ānā number of turns around an soft iron pica which is mostly cylindrical in shape and then passing an ac or dc current through the wire. The direction of resultant magnetic field and current through the wire can be related using Amperes Right Hand Grip rule. When we pass the current though the electromagnet, the core part i.e. The soft iron piece gets magnetized and if we switch off the current through wire, the core part looses its magnetism but retains a small amount of magnetism known as residual magnetism. This property of a material to retain magnetism even after removal of external magnetomotive force is known as retentivity. The strength of electromagnet depends upon permeability of the core material which is largest in case of CRGO materials used as core laminations of transformer, number of turns of wire wound around the core, the length of the core, diameter of the core and the magnitude of the current flowing through the wire. So, electromagnets are used mostly in applications when magnetic field can be varied according to need and when the magnetic field is needed temporarily but not all the times. Also, when we want magnetic flux density beyond the range of permanent magnets, we have no choice left other than using electromagnets.
Electromagnet is produced by winding coil around an iron like metals and passing AC current. When current is switched off most of the magnetic property in the magnet is lost.
Magnets produced in materials by passing direct current or rubbing against another bar Magnet is a bar magnet. It has magnetic property all the time