mean filter
The mean filter is the most elementary smoothing operation: replace each pixel with the plain arithmetic average of the pixels in a small window around it, usually a square. Every neighbour gets the same weight, so a 3-by-3 mean filter is a kernel of nine entries all equal to 1/9. It blurs the image and suppresses random noise, and it is trivial to understand and implement, which is why it is the textbook starting point.
Its noise-reduction power comes from averaging: if each pixel carries independent zero-mean noise with standard deviation sigma, averaging n pixels shrinks the noise standard deviation by a factor of the square root of n. So a 5-by-5 window (25 pixels) cuts noise roughly fivefold, but at the price of blurring genuine detail by the same amount, the filter cannot tell signal from noise. A crucial efficiency note: because all weights are equal, the box filter can be computed in constant time per pixel regardless of window size using a summed-area table (integral image), a precomputed running-sum image that lets any rectangle's total be read in four lookups.
Compared to a Gaussian, the mean filter is worse on two counts. Its abrupt square shape has a frequency response shaped like a sinc function, with sidelobes that cause ringing and can even invert some frequencies, and it is anisotropic, blurring more along the diagonal than along the axes. It is also poor against salt-and-pepper noise: a single white-hot outlier pixel drags the whole local average upward. For those reasons the mean filter is best seen as a fast, crude tool or a building block (stacked box blurs approximate a Gaussian) rather than a quality smoother.
Smoothing a single bright dot with a 3x3 mean filter spreads it into a uniform 3x3 grey square; the same dot through a Gaussian becomes a soft fading blob, the box's hard edges are exactly what cause ringing.
Pitfall: never use a mean filter to remove salt-and-pepper noise. The mean is not robust to outliers, so each impulse smears into a grey blotch instead of being removed; the median filter is the correct tool there.