The magnetic effects in a magnetic material are due to the atomic dipoles in the materials. These dipoles arise due to the tiny current loops of electrons in atomic orbits. Each revolving electron in the atomic orbit is equivalent to a tiny current loop which is capable of producing a magnetic field and hence atom has a magnetic dipole moment.
Each electron has an orbital magnetic moment due to its orbital motion and spin magnetic moment due to its spin motion. The nucleus may also has a nuclear magnetic moment but it is much smaller than the magnetic moments of orbital electrons. The resultant magnetic moment of the atom is the vector sum of orbital, spin and nuclear magnetic moments.
Reference: This article is referred from my book “Electrical Engineering Materials” having ISBN 978-81-272-5069-0