A form of immunity that occurs when a large portion of the population becomes immune to a disease, indirectly protecting those who aren't.