In Convolutional neural network, pooling is used to reduce the spatial size of the convolved feature. There are mainly two types of pooling such as max pooling and average pooling. In max pooling, a window moves over the input matrix and makes the matrix with maximum values of those windows.
In average pooling, it is similar to max pooling but uses average instead of maximum value. The window moves according to the stride value. If the stride value is 2 then the window moves by 2 columns to right in the matrix after each operation. In short, the pooling technique helps to decrease the computational power required to analyze the data.
If you are interested in Convolutional Neural Network, you can register for this AI course by Intellipaat.
You can watch this video on How CNN works to understand more about pooling: