In signal processing, a filter is a device or process that transforms a signal by selectively choosing specific frequencies and leaving others with appropriate gain or as it is.
Filtering is a class of signal processing, the defining feature of filters being the complete or partial suppression of some aspect of the signal. Most often, this means removing some frequencies and not others in order to suppress interfering signals and reduce background noise. However, filters do not exclusively act in the frequency domain; especially in the field of image processing. Under image processing, filters also exist in other domains.
Source: Wikipedia.