What caused the square flare above sun? I've read everything I could get my hands on about flare and different types. I have three diffrent photos of the same flare and I'm just looking for a reason how it happened.
Shooting directly into the sun is a tricky thing. Flare from reflections on the lens cover (filter glass), between the lens elements, etc, is the norm. Only the advances in anti-reflective coatings allow your image to look anywhere near as good as it does. You'll do better to get the sun behind a tree, behind a subject's head (with some fill flash, perhaps), or behind the clouds when shooting toward the sun. If you can actually see the sun in your image, or if it's just off-camera, with rays hitting the glass of your lens cover, you will probably have flare of some type. In the latter situation (just out of the frame), you might try shading the lens with a your hand (or, better) a proper, black lens shade with baffling and/or velvet layer. Depending on how much flare covers your image, you may be able to clean it up. And sometimes the flare can look really cool, too. So, don't fear the flare so much you never "break the rules", but do expect it when shooting into the sun. There is a reason shooting into the sun is normally not recommended. Also, be sure to keep cameras pointed toward the sun only for brief periods, as sensor damage can quickly occur.
Flare caused by stray light. When bright light enters the camera it can reflect about inside the camera. This unwanted reflections are light bouncing off off polished surfaces. This can be polished interior lenses or filters or metal surfaces. This stray light arrives at the image sensor along with the image forming light rays. This stray light comingles and this is the flare you are seeing.
We avoid by not aiming the camera at or near a bright light sources. Mounting a lens shield before the lens can help. This is a cone made of flat black material mounted so the lens looks through but peripheral light rays are blocked.