The moon filter increases contrast when observing the moon. The bright moonlight is filtered out so that structures are easier to see. The filter is simply screwed into the eyepiece or a camera.
The filter effect of this moon filter is not achieved by coloured glass. It is instead a so-called neutral density filter.
Neutral density filters (grey filters) are ideal for all situations where glare needs to be prevented and the object should not appear coloured. The classic application is moon observation. These filters are also very well suited for additional attenuation during solar observation, but they do not replace the actual solar filter!