Hermann Grid Illusion
A plain grid of black squares on a white background produces faint gray smudges at every intersection - visible only when you're not looking directly at them.
What you're seeing
A simple grid: black squares arranged in rows and columns, separated by white gaps. Every gap is uniformly, unambiguously white - there's no gradient, shading, or gray pixel anywhere in the underlying image. And yet, at the intersections where four white gaps meet, faint gray smudges seem to flicker into existence, especially when you're looking slightly away from them rather than straight at them.
Why it happens
The standard explanation reaches back into the wiring of the retina itself, specifically a structure called a receptive field. Retinal ganglion cells - the neurons that carry visual signals from the eye toward the brain - each respond to light falling within a roughly circular patch of the visual field, with a center region and a surrounding ring that work in opposition to each other. A cell that gets excited by light hitting its center will get inhibited by light hitting its surround, a wiring pattern that helps the visual system emphasize edges and boundaries rather than wasting signal on large uniform regions.
At an intersection of the grid, a ganglion cell's receptive field sits surrounded by white on four sides - more white in its "surround" than a cell positioned along a single straight gap, which only has white above and below (or left and right), with black tiles on the other two sides. More white in the surround means more inhibition of that cell's response, which the brain reads out as "slightly less bright than the plain gap regions" - producing the illusory gray smudge, purely as an artifact of how much inhibitory surround-signal each intersection happens to receive relative to a straight stretch of gap.
This account, while the traditional textbook explanation, has been challenged since the 1990s by variations of the grid that keep the same intersections and gaps but curve the grid lines slightly, which weakens or eliminates the illusion even though the local receptive-field geometry at each intersection is nearly unchanged - suggesting that cortical processing beyond the retina also plays some role, not simple receptive-field inhibition alone. The full picture is still debated, but the core insight holds either way: the smudges are a byproduct of contrast-processing machinery operating on a perfectly uniform white field, not evidence of anything actually gray in the image.
Why it fades when you look straight at it
The smudges are strongest in peripheral vision and tend to vanish at the exact intersection you're fixating on directly. This tracks with the fact that receptive fields get smaller as you move toward the center of your visual field (the fovea), where visual acuity is highest - smaller receptive fields are less affected by the surrounding intersection geometry that produces the illusion in the first place, so foveal vision partially "sees through" the grid even while peripheral vision doesn't.
A little history
Physiologist Ludimar Hermann first described the effect in 1870, while, according to the frequently repeated account, reading a textbook page with a grid-patterned illustration - though as with many historical illusion origin stories, the precise circumstances are hard to verify. It remains one of the oldest and most-cited illusions used to introduce students to receptive fields and lateral inhibition in introductory neuroscience and perception courses.
Related reading
For a related illusion built on the same "surrounding context changes perceived brightness" principle, see simultaneous contrast, and for another illusion rooted in low-level visual processing rather than higher-level interpretation, see the café wall illusion.