Pooling is a CNN layer that downsamples each feature map by summarizing small windows, usually with their max or mean. We need it to cut spatial size and computation, let later layers see more of the image, and make features somewhat robust to small shifts. It has no learned weights.
Example: 2 × 2 max pooling with stride 2 on the 4 × 4 map with rows [1 3 2 0], [4 2 1 5], [0 1 3 2], [2 6 1 1] keeps each block's largest value: [4 5] and [6 3]. Average pooling gives [2.5 2] and [2.25 1.75]. VGG uses five such layers to shrink a 224 × 224 input to 7 × 7 maps.
The convolutions, not pooling, learn the feature hierarchy of edges early and shapes deeper; pooling helps by enlarging receptive fields. Follow-ups: max pooling sends the gradient only to the winning position, global average pooling (Network in Network, 2013) replaces fully connected heads, and many modern networks downsample with strided convolutions.