A camera lens typically is composed of several component lenses – around 6 to 10 depending on the sophistication of the lens design.
The lenses are designed to guide light reflected from an object onto a light-sensitive film or a digital sensor.
Any light which enters the front of the system of lenses but – for one reason or another – does not follow the expected path through the lenses – needs to be absorbed. That is why the internal surfaces of the lens are painted black – to absorb this stray light.
Typically glass reflects 4% of the incident light. If the lens is coated with an anti-reflection coating this can be reduced to less than 1%.
Lens flare occurs when, in addition to the scene in question, there is a very bright light source – typically the Sun or a spotlight in the field of view of the lens. This may be thousands of times brighter than anything else in the field of view. So even if 1% of the light from this bright source is spuriously reflected – it may be brighter than the rest of the image.
Lens flare is the unanticipated patterns that this spuriously-reflected light makes on the image sensor.