Rotation of magnetic dipole in uniform $B$ field It is known that when a magnetic dipole is placed under an uniform magnetic field, it will experience torque and it rotates. There is one thing I am not really sure about: Will a magnetic dipole stop rotating once its magnetic dipole moment align with external magnetic field (like how electric dipoles stop rotating when its moment align with external electric field) or it will rotate forever?
I learned before that in generators and electric motors, a wire loop rotates forever in magnetic field. Can this reasoning be applied to magnetic dipoles?
 A: If there is no damping then the dipole will indeed oscillate indefinitely.
Having said this there will always be some form of damping. Even if we had a completely isolated dipole in a vacuum the dipole would radiate electromagnetic waves as it oscillated, so the rotational energy would gradually be converted to the energy of the emitted electromagnetic waves. For a dipole in a solid the energy would rapidly be converted to vibrational energy of the solid i.e. heat.
A: If you consider as magnetic dipole a single electron, then its dipole will be exactly matched to the external field direction. But if you consider a more complex body, this is much more complex.
Take an atom. In it there are the magnetic dipoles not only of the electrons, but also of the protons and neutrons. These are trapped in a complex alignment of all their dipoles. Under the influence of another dipole - the external magnetic field - not only the atomic magnetic dipole is rotated. No, at the same time the inner-atomic alignments change. The atom gains magnetic field strength because not only the atom as a whole aligns, but additionally its subatomic particles are rotated in the direction of the external field.
Will a magnetic dipole stop rotating once its magnetic dipole moment align with external magnetic field … or it will rotate forever?
An ideally isolated electron (proton, neutron and their antiparticles) will oscillate forever. Remark 1: According to the empirics of thermodynamics we know that such an ideally isolated electron is impossible, so this oscillation will take place damped. Remark 2: Magnetic fields never transfer energy permanently. They act like a spring. Therefore the statement "If ideally isolated, then oscillation forever".
Every more complex body has more than one magnetic dipole. Since there is an equilibrium situation already from three dipoles, any overshooting comes to a standstill.
