Consider the child in the rotating carousel with the charged ball and a bar magnet in his hand. The analogy is then that the child is an electron rotating around a nucleus.
By the child holding the bar magnet in the hand we get the spin dipolar contribution. For a moving magnet creates an electric field. The magnetometer can then be used to measure the amount of magnetic field.
The charged ball in the child’s hand can be seen as a current loop. This current loop creates a magnetic field, the strength of which can again be measured by the magnetometer.