An electromagnet is a temporary magnet produced by current flowing through a coil with soft iron core. The magnetic field remains only when the current is flowing, in absence of current it has no magnetic effect.
We can increase the strength of electromagnet by increasing the no. of turns in the coil and also by increasing the strength of current flowing in the coil.
soft iron core is used to make an electromagnet.