The atomic magnetic dipole is the source of magnetism. On the atomic level, magnetic dipoles mainly are the result of two types of movement of the electrons. There is the orbital motion of the electron around the nucleus, which produces an orbital dipole magnetic moment. The other component of the electron magnetic moment is due to the spin dipole magnetic moment. However, the movement of electrons around the nucleus isn't really an orbit, nor is the spin dipole magnetic moment associated with actual 'spinning' of the electrons. Unpaired electrons tend to contribute to a material's ability to become magnetic, since the electron magnetic moment can't be totally canceled out when there are 'odd' electrons.
The protons and neutrons in the nucleus also have orbital and spin angular momentum, and magnetic moments. The nuclear magnetic moment is much weaker than the electronic magnetic moment, because although the angular momentum of the different particles may be comparable, the magnetic moment is inversely proportional to mass (mass of an electron is much less than that of a proton or neutron). The weaker nuclear magnetic moment is responsible for nuclear magnetic resonance (NMR), which is used for magnetic resonance imaging (MRI).
Make a Liquid Magnet | Bend Water with Static
Image: Practical Physics, Macmillan and Company (1914)