Sundogs, also known as mock suns or "parhelia", are a pair of brightly colored spots, one on either side of the sun.
Sundogs are visible when the sun is near the horizon and on the same horizontal plane as the observer and the ice crystals. As sunlight passes through the ice crystals, it is bent by 22 degrees before reaching our eyes, much like what happens with 22 degree halos. This bending of light results in the formation of a sundog.
The difference between sundogs and halos is the preferential orientation of the ice crystals through which the light passes before reaching our eyes. If the hexagonal crystals are oriented with their flat faces horizontal, a sundog is observed. If the hexagonal crystals are randomly oriented, a halo is observed.