The function depends on the type of the filter (low pass, high pass, band pass, notch).
Some of the uses are to filter out noise, take the DC component of a varying signal, extract a signal with a certain frequency out of a combination of signals etc.