A filter will filter debris out of the air line. Mill scale, sand, pieces of solder, small barn yard animals, etc.
A coalescing filter is a finer filter, and will filter out finer particles, including liquids like oil from the compressor, and water vapor. Not all of the water of course, you need a drier or descant for that, but it'll sure help with the bigger water drops. I believe the coalescing filters generally have some sort of "vane" to make the air move around and help make the debris and liquids fall out better than a regular filter.