Herd immunity is typically achieved through widespread vaccination programs. Vaccination not only protects the individual receiving the vaccine but also helps to protect the community by reducing the number of potential hosts for the pathogen. In some cases, herd immunity can also be achieved through natural infection, although this can have serious health risks and is less controllable.