lateral inhibition
Lateral inhibition is a trick your senses use to make edges and differences stand out: when one sensing cell fires strongly, it quietly tells its neighbors to pipe down. Picture a row of people each holding a flashlight. Whoever shines brightest reaches over and dims the lights on either side of them. The result is that a bright spot looks even brighter next to its now-darker neighbors, and a boundary between light and dark gets crisper. The signals that reach your brain are not a flat copy of the world — they have been sharpened so that contrast, the change from one thing to the next, is exaggerated.
It works because neighboring neurons are wired to push against each other through inhibitory connections, often by way of small in-between cells called interneurons that release a calming chemical signal. A strongly active cell sends this hush sideways to the cells around it, so their output is dialed down in proportion to how excited their neighbor is. Where everything is uniform — an even patch of gray, a steady tone — every cell quiets every other cell about equally, and the response stays low. But right at a border, a cell sitting in the bright region gets less hushing from its dim-side neighbors than from its bright-side neighbors, so its signal pops. This is why our eyes notice outlines so easily, why we can pick a single pitch out of a noisy chord, and why a fingertip can feel the exact edge of a coin — the nervous system spends its attention on where things change, not on the boring sameness in between.
The illusion called Mach bands — faint bright and dark stripes you seem to see right where two shades of gray meet — is lateral inhibition caught in the act.