Magnetic fields are produced by moving electric charges. Everything is made up of atoms, and each atom has a nucleus made of neutrons and protons with electrons that orbit around the nucleus. Since the orbiting electrons ≠are tiny moving charges, a small magnetic field is created around each atom.