Current passing through a coil causes a strong magnetic field
The field is even created in normal wires but is not strong enough to effect the flowing electrons
The strength of the magnetic field can be increased by using an iron core, increasing the number of turns in the coil and the electric current

Passing an magnetic field through a coil will induce a voltage and current called as electromagnetic induction