Magnetism ultimately is due to the motion of electric charge. For a macroscopic object, like a wire loop, an electric current flowing through it has a magnetic moment. Far from the loop there is a magnetic field proportional in strength to its magnetic moment.
For a microscopic object, the physical picture is more complex. An electron within an atom can have orbital angular momentum and a magnetic moment proportional to that orbital angular momentum; the electron also has intrinsic angular momentum, or spin, and a magnetic moment proportional to that spin angular momentum. The orbital and spin angular momentum of an electron are comparable in magnitude, as are their magnetic moments. Far from the electron there is a magnetic field proportional in strength to its magnetic moment.