Take a pixel just inside the edge of a bright nucleus. Its 5 × 5 neighborhood holds nuclear pixels on one side and dark background on the other. An Average filterLoading... mixes them all, and the edge goes soft. The Bilateral filter weighs each neighbor by two things: its distance from the center pixel, and how much its intensity differs.
The Engines Reference puts it this way. Each output pixel is a weighted average of the neighboring pixels, with the weights adjusted by the Euclidean distance between pixels and by their intensity differences. It is a non-linear filter for attenuating image noise while preserving edges. You'll find it in the Basic Operations Module under Filters, and in the reference example it returns a grayscale image matching the input.
A neighbor on the far side of an edge is very different from the center pixel, so it counts for little, and the average draws mostly on the near side. Inside a uniform region every neighbor is similar, and the filter acts like an ordinary distance-weighted blur. Unlike the Median filterLoading..., which also keeps some borders, it averages, so it does create new gray levels.