Protection of a whole community from an infection because enough people are immune that it cannot spread easily.