Answer :
Explanation:
Iron has tiny magnetic domains inside it. Each domain acts like a tiny magnet with its own magnetic field. These domains are randomly distributed thus resulting in zero magnetic field and iron doesn't behave like a magnet.
When a copper wire is wound around the nail and current is passed through the coil, magnetic field is generated. This magnetic field penetrates through the nail. Due to this the magnetic domains of the nail align in the same direction thus having a net magnetic field. The nail behaves like a magnet till the time current flows through the coil.