How is the earth protected from comets?

since comets are big, dusty snow-balls, it doesn't much protection from most of a comet, and the atmosphere takes care of that.

However, in the case of a direct hit by the head of a comet ... kerpow!

The earth wouldn't really be damaged, but the little things (like us) would be.