What is the difference between a magnetized nail and a coil?
Constant magnetic field is generated when there is a constant current. An alternating electromagnetic field is generated then the current is alternating. An alternating magnetic field will induce a current in a nearby conductor such that the magnetic field generated by that current will "resist" to the changes in the overall magnetic field, as the magnetic field "doesn't like" to be changed. This is why transformers won't work for DC.