It has a coil inserted in an iron core which, being fed with power supply causes a magnetic force capable of attracting and holding ferric pieces that approach to the magnetic field. Unlike the permanent magnets, their attraction force, as well as their acting distance, is superior, and they are very useful for high granulometries or relevant working heights.
When power supply of the electromagnet is cut off, the ferric metals captured thereby come off on their own.