Halo
The 22-degree halo is the most common occurrence seen. The ring forms at a 22-degree angle from the Sun or the Moon, and occurs when sunlight or moonlight shines through randomly falling ice crystals. As sunlight enters one side of the crystal, it refracts and separates the white sunlight into the colors of the spectrum. This light exits from another side of the crystal, forming a slightly colored ring. If the sky is only partially covered with clouds, the halo will appear fragmented or broken.
Double Halo
A rare secondary halo, at 46 degrees, occurs when sunlight or moonlight enters the end of a hexagonal column and exits through one of the six sides. Typically, only a fraction of the 46-degree halo appears, due to its larger angular distance from the Sun or Moon.
Color Spectrum
The blue part of the solar spectrum undergoes the most bending, while the red portion bends the least; this bending process causes the inside of a halo to appear reddish and the outside of the ring to appear bluer. This color array is contrary to what you see in a rainbow. A halo forms by refraction through ice crystals, whereas refraction and reflection through raindrops causes rainbows.
Types
Cirrostratus clouds, which harbor the halo-forming ice crystals, form high in the atmosphere---usually around 20,000 to 50,000 feet. The ice crystals that form the 22-degree halo consist of small, randomly oriented needle-like crystals. Parry arcs, Lowitz arcs and the circumscribed halo form by the vibrating motion of larger, horizontally oriented plates and capped columns of crystals.
Sun Dogs
Sun dogs (also known as mock suns or parhelia) often appear as bright spots at either one or both sides of the halo ring in the three and nine o'clock positions, giving the illusion of three suns. Like halos, sun dogs require ice crystal plates of cirrostratus clouds to form; however, sun dogs are more colorful than the equivalent 22-degree halos because the ice crystals are much larger and are positioned horizontally in the clouds. The 22-degree parhelia is also visible around the Moon, although this is rare.