The mammalian intestine is colonized by trillions of microorganisms, most of which are bacteria that have co-evolved with the host in a symbiotic relationship. The collection of microbial populations that reside on and in the host is commonly referred to as the microbiota. A principal function of the microbiota is to protect the intestine against colonization by exogenous pathogens and potentially harmful indigenous microorganisms via several mechanisms, which include direct competition for limited nutrients and the modulation of host immune responses. Conversely, pathogens have developed strategies to promote their replication in the presence of competing microbiota. Breakdown of the normal microbial community increases the risk of pathogen infection, the overgrowth of harmful pathobionts and inflammatory disease. Understanding the interaction of the microbiota with pathogens and the host might provide new insights into the pathogenesis of disease, as well as novel avenues for preventing and treating intestinal and systemic disorders.