Understanding Lens Flare
Lens flare is of two types: veiling flare (haze) and ghosting flare. Both types occur together, though some lenses might show ghosting flare with minimal veiling flare.
Veiling flare is highly dependent on how extraneous light strikes the front lens element, as well as the quality of the lens coatings.
A lens with poor internal baffling or blackening can also produce internal reflections which reduce contrast. The lens diaphragm itself can reflect light into the lens, and this is why a lens could have more flare stopped down than wide open!
A lens with strong control of veiling flare can be shot into extreme lighting situations. Modern zooms with their super-duper coatings can perform extremely well, like this image from the Nikon 70-200mm f/2.8G VR II.
In this example, veiling flare is absent: blacks remain black, which is as it should be.
Yet change conditions just a little, and flare can become quite pronounced. Here (below) the sun is just outside the frame, and the non-image-forming light causes a high level of veiling flare (haze). Hence any evaluation of flare must take into account a variety of conditions.
In this case the lens hood is of no use because the sunlight strikes the lens directly. But in many situations, the lens hood keeps extraneous light from striking the front lens element, thus preventing this kind of veiling flare.
Ghosting flare results in "ghosts" or images of the lens diaphragm as bright spots, typically color. This can be a particularly noticeable problem with complementary colors: orange flare against a blue sky for example.
Even lenses with outstanding control of veiling flare can suffer from "ghosts". The amount of ghosting flare is usually associated with more lens elements (more reflective surfaces). Simpler lenses with fewer elements tend to have minimal ghosting flare, so long as they also have high quality lens coatings.
Ghosting flare usually is an issue when including the sun, but it can also be an issue when shooting at night with strong light sources because much of the frame tends to be dark.
Ghosting flare can also be induced by use of a filter, more on how filters affect image quality.