Filters allow only certain wavelengths of light to pass through them, while blocking other wavelengths.
To better understand how filters work, try out the filter tool. Select a filter from the dropdown menu and observe the effect that filter has on the light coming out of the prism.