On the right you may observe two wooden railroad tracks. Which one is larger? [For me it looks like the lower is larger.]
While you are pondering this question, they exchange their places (whenever the little progress wheel’s indicator is on top). Unexpectedly, when stacked in inverse order, their size also appears to be exchanged.
Of course, as you guessed, their size, in fact, is identical.
You can click (tap) on the shapes and move them around. So you can check for yourself that they are identical.
This is a classical “geometric illusion”, a slight variation on the version first described by Joseph Jastrow in 1891 (a lively biography here). A number of studies have examined it, still this illusion is not well understood. Jastrow himself wrote (I edited his words so they make sense without his context, and they apply to his figure depicted below on the right): “The lower figure seems distinctly the larger, because its long side is brought into contrast with the shorter side of the other figure. … In judging areas we cannot avoid taking into account the lengths of the lines by which the areas are limited, and a contrast in the lengths of these is carried over to the comparision oft the areas. We judge relatively even when we most desire to judge absolutely.”
What does “understanding an illusion” mean anyway? For me any explanation would follow naturally from a general understanding of the mechanisms underlying vision. For instance: the “stepping feet” illusion follows directly from the property of motion receptors being (nearly) color blind. For the Jastrow illusion it is easy to come up with hand-waving explanations invoking local size comparisons etc., but these would be ad-hoc explanations, specific only for the phenomenon at hand and thus not very satisfying.
Jastrow, by the way, also described the famous “duck-rabbit” bistable image.
Jastrow J (1892) Studies from the laboratory of experimental psychology of the University of Wisconsin – II. Am J Psychol 4(3):381–428