How does herd immunity protect the nonimmune members of the

How does herd immunity protect the nonimmune members of the population from acquiring a disease? Will herd immunity work for diseases that have a common source, such as water? Why or why not?