The common filter is a huge part of shaping sound in electronic music production and DJing. You've probably used a filter many times before without ever really thinking about the in-and-outs of what's actually going on. That's one of most powerful characteristics of a filter, they're easy to use, yet can have dramatic effects on the sounds you're working with.
In simplest terms, a filter controls the audible harmonics of whatever signal it's applied to. In a broader sense, think of like a barrier, which when used in musical applications, allows certain parts of the frequency spectrum to pass through unaffected, while blocking out others.
This modifies the timbre and tonal quality of the sound, allowing you to do things like emulate certain instruments with a synth, or provide moments of contrast in a DJ mix.
Filters are generally of four types; Low-pass, High-pass, Band-pass and Notch. Each of these types is a description of the shape the filter takes in relation to the frequency spectrum and as a result, which frequencies it passes (allows through) and which it blocks. The point on the frequency spectrum at which the filtering takes affect is known as the "cutoff".