Typically, for electrons in atoms, we talk about coupling of angular momentum (e.g. spin orbit coupling), rather than magnetic interaction, between electrons. However the effects are not really separable .. part of the magnetic moment of the electrons in atoms arises from their intrinsic angular momentum in the first place.
For multi-electron atoms, you can use angular momentum coupling rules to come up with term symbols for the electronic states. These term symbols use angular momentum coupling rules to associate angular momentum quantum numbers for the total angular momentum, orbital angular momentum, and spin angular momentum of the overall electronic wavefunction. The total angular momentum (quantum number J), is always a good quantum number (neglecting the nuclear hyperfine interaction), but the orbital angular momentum quantum number (L) and spin angular momentum quantum number (S), are only approximately good (at best). By the way, a "good" quantum number is one corresponding to an operator that commutes with the Hamiltonian ... an "approximately good" quantum number corresponds to an operator that does not strictly commute with the Hamiltonian, but where the coupling is small compared to the energy level spacing. If the spin-orbit interaction is particularly large, it doesn't even make sense to talk about overall orbital angular momentum (L) and overall spin angular momentum (S) any more. Rather, it is more appropriate to couple the orbital (l) and spin (s) angular momenta to obtain a total angular momentum (j) for each individual electron, and then treat the coupling of these angular momenta to obtain the overall total angular momentum (J). This scheme is called j-j coupling.
Anyway, the point of all of this is that the magnetic dipole of an atom can be determined from the total angular momentum quantum number, taking into account the angular momentum coupling according to the Lande g-factor.
The wikipedia pages on this stuff are pretty good. If you are interested, you might want to look at the ones on the electron magnetic dipole moment, Term symbols, and angular momentum coupling to start.