The generation of a magnetic field by an electric current is called electromagnetism. When a current carrying wire is made to form a coil around a piece of iron, the result is an electromagnet. Magnetism is produced by the motion of electric charges. When the electric field rapidly changes the magnetic field rapidly changes in return. The use of coils of wires produces a relationship between electricity and magnetism that gives us another magetism called electromagnetism.