Filters are used to block or reject certain wavelengths of light. Specifically the intent is to block local artificial light (i.e. street lights) and allow only the expected wavelengths of deep space objects.
Narrowband imaging is an extensive technique that collects data on one or few narrow ranges of the spectrum, then repeats for multiple such ranges. This generally allows for higher quality images.
Typical configuration of Canon EOS DSLR: (two filters, LPF1 and LPF2)