A sundog is a bright spot beside the Sun caused by sunlight passing through ice crystals in the atmosphere. Also called a parhelion, it usually appears as one or two subtly colored patches at the same height as the Sun.
Sundogs form when flat, hexagonal ice crystals in cirrus or cirrostratus clouds become oriented roughly horizontally as they drift downward. The crystals refract sunlight like tiny prisms, bending it toward observers on either side of the Sun. They are most noticeable when the Sun is low in the sky and often appear about 22 degrees away.
A sundog is one specific type of atmospheric halo, not a name for every bright ring or spot around the Sun. A halo is a broader family of optical effects produced by ice crystals. Sun pillars, by contrast, are vertical columns of light created when sunlight reflects from falling or suspended ice crystals.