What are Electromagnets?

Electromagnets are magnet which are activated when electricity passes through them. Simple electromagnet can be formed by winding a wire over soft iron. Electromagnets are used in relays, harbors to pick up containers, etc.