A filter can be two things in photography. Commonly a filter is a glass attachment that is placed in front of a lens (or screwed in) to create a special effect or give a colour cast. Common filters are Polarizing, UV or Sky.
A filter is also a software term used to describe a digital effect that is applied to an image. There are many types of filters available for programs like Photoshop to create a new infinite number of effects.