Following the recent Sunset Workshop, I got a question about how to deal with annoying sun spots (i.e, len's flare) that occasionally show up. This is something I have to deal with all the time when I shoot 360 degree panoramas, which I do on a nearly daily basis for real estate virtual tours.
Len's flare is a result of the scattering and reflection of a bright light source within the optics of the lens, usually at near direct or oblique angles. Manufactures of lenses coat them to minimize these flares, and that helps a lot, but it doesn't always prevent them.
Filters often add to the problem, so it's important to use a quality coated filters, whether polarizers, NDs, UV or other protective filters. Sometimes removing the filter altogether will help as a filter may be providing that one additional optical element scattering the light and introducing flaring. However, even the best optics and coatings can't eliminate flares in the more extreme situations. Often the best solution is to simply change your viewing position and therefore the angle relative to the light source and see if that will work.
Adding a lens hood is often an effective and practical means to shield the objective lens from a flare inducing angle. In my situation of shooting panoramas, there are still required shots that are within the family of angles that produce lens flare. In these situations, I try to use my my hand like a larger lens shade to shield the lens. This usually works pretty well. If the sun is right on the edge of my shot, I'll sometimes use my finger to blot it out entirely and then use Photoshop to paint it away. I'll also try to select a camera position where the sun is fully or partially obscured by an object like a tree branch, roofline or other available foreground structure.
There is no one perfect solution. Sometimes a flare is not very noticeable at the time of the shot, but then becomes more prevalent when contrast is applied in post production. Often a combination of these techniques will give satisfactory results, but its important to be aware of the situation at the time of the shot, otherwise you may not notice it until post-production and then it may be to late to salvage an otherwise great shot. On the other hand, maybe lens flare actually makes for an interesting image. Just do an Internet search on "how to make lens flare in photoshop" to find plenty of examples to accomplish this artificially.
So the short answer to prevent Len's flare is: Buy quality lenses. Use high quality coated filters or remove them altogether. Use a Len's Shade. Employ your hand or other shield to shade the lens. Change your angle of view relative to the sun. Block the sun with a foreground object. If you have a favorite technique that works for you, please share it me.