In simple words: Pooling shrinks feature maps; classification turns features into an answer.
Pooling
Pooling reduces the width and height of feature maps. Max pooling keeps the largest value from a small region, preserving a strong detected feature while shrinking the representation. Some modern CNNs use other downsampling approaches.
Classification
After feature extraction, a model combines features to predict a category. Flattening lays a feature grid out as a list for a dense layer; global average pooling is another common option. The final scores can be converted into probabilities.
See the flow
A digit reader finds curves and lines, reduces the feature maps, then predicts which digit is shown.
Remember: Pooling shrinks feature maps; classification turns features into an answer.