Filters that slide and stack
A convolutional neural network works by sliding small filters across an image, each one scanning a local neighborhood of pixels for a specific pattern, an edge, a corner, a patch of color. Early layers pick up these simple local features, and as you stack more convolutional layers, the network combines them into larger, more abstract shapes, an edge plus another edge becomes a corner, corners become a contour, contours become an eye or a wheel or a leaf. By the final layers, the network is recognizing whole objects built up from this local-to-global hierarchy.
This design isn't arbitrary, it matches a real property of images, nearby pixels tend to be related, and far-apart pixels usually aren't directly relevant to each other. A convolutional filter only looks at a small local window at a time, so this assumption is baked directly into the architecture. That built-in assumption is called an inductive bias, and it's a large part of why CNNs became so effective and so data-efficient at vision tasks.
