A magnetic field is generated when electric charge carriers such as electron s move through space or within an electrical conductor. But there are differences in the ways electrostatic and magnetic fields interact with the environment.
Electrostatic flux is impeded or blocked by metallic objects.
Magnetic flux passes through most metals with little or no effect, with certain exceptions, notably iron and nickel. These two metals, and alloys and mixtures containing them, are known as ferromagnetic materials because they concentrate magnetic lines of flux. An electromagnet provides a good example. An air-core coil carrying direct current produces a magnetic field. If an iron core is substituted for the air core in a given coil, the intensity of the magnetic field is greatly increased in the immediate vicinity of the coil.