Camera lenses have multiple elements, (glass elements), that are designed to bend light and focus an image onto the sensor. Each surface is a potential source of reflections. Manufacturers coat these optics to reduce the reflections. They also design the lenses to focus all of the colors (different wavelengths of light) onto the sensor in register with each other. Sometimes they play games to take into account the color filter array on the sensor to get the most amount of light and color information into each pixel in the image.
When shooting the sun, or a bright light, the light source is so strong that internal lens reflections that normally do not bother you become visible. For normal scenes these reflections are reduced by orders of magnitude and become part of the noise in an image.
From a retired Kodak Research Scientist.