Electromagnet is a strong magnetic field produced inside a solenoid can be used to magnetise a piece of magnetic material like soft iron, when placed inside the coil.