What is Electromagnet?

Electromagnet is magnet which is activated when electricity flows through it. Simple electromagnet can be made by winding wire around soft iron. Electromagnet is used is harbors to pick up heavy containers and in relays.