1) A program that accepts a certain type of data as input, transforms it in some manner, and then outputs the transformed data. For example, a program that sorts names is a filter because it accepts the names in unsorted order, sorts them, and then outputs the sorted names.
Utilities that allow you to import or export data are also sometimes called filters.
2) A pattern through which data is passed. Only data that matches the pattern is allowed to pass through the filter.
(3) In paint programs and image editors, a filter is an effect that can be applied to a bit map. Some filters mimic conventional photographic filters, but many transform images in unusual ways. A pointillism filter, for example, can make a digitized photograph look like a pointillistic painting.