What does it mean when there is a rainbow around the moon?
Simply that there are fine particles in the atmosphere, generally quite high in my experience, so probably ice.
This is often a sign that there is a large, active low pressure system with significant wind shear above it which causes the upper, icy layers to be blown off and into your line of sight.
The actual mechanism is identical to a regular rainbow I think, though I have often wondered if diffraction causes it or has an effect. Once or twice I have seen a double rainbow (two full rainbows) around the moon and attempted to estimate the height of the particles through the diffraction equation.