Filtering crosses physics, electronics and computation. An interference filter in an optical path passes a band of wavelengths and rejects the rest, separating the light you want from the light you don't. An electronic filter in a circuit does the same with a band of frequencies in the time domain. An image filter does the same job in the spatial domain, separating the spatial signal you want to keep from the spatial signal you don't.
In every case the principle is the same: the signal you want and the signal you don't rarely occupy the same place in the relevant domain. Real biology (the cells, the structures, the boundaries) lives at one set of spatial frequencies; sensor read noise lives at another, bright outliers from hot pixels or stray particles at a third, and slowly varying autofluorescence at a fourth. The right filter is the one whose pass-band matches the spatial signal you want to surface. That pass-band can be explicit (a Gauss filter passes low spatial frequencies) or implicit (a median filter passes neighborhoods that aren't dominated by outliers).
The unwanted signal isn't always uniform. It can be a steady floor across the field, a gradient that varies smoothly across the image, or a localized region of its own. Each case suggests a different filter, sometimes a chain of filters, sometimes position-aware filtering. Recognizing the character of that signal (its scale, its uniformity, whether it is random or structured) often determines the right filter more than the filter's name does.