A dense resident microbial community in the gut, referred as the commensal microbiota, coevolved with the host and is essential for many host physiological processes that include enhancement of the intestinal epithelial barrier, development of the immune system and acquisition of nutrients. A major function of the microbiota is protection against colonization by pathogens and overgrowth of indigenous pathobionts that can result from the disruption of the healthy microbial community. The mechanisms that regulate the ability of the microbiota to restrain pathogen growth are complex and include competitive metabolic interactions, localization to intestinal niches and induction of host immune responses. Pathogens, in turn, have evolved strategies to escape from commensal-mediated resistance to colonization. Thus, the interplay between commensals and pathogens or indigenous pathobionts is critical for controlling infection and disease. Understanding pathogen-commensal interactions may lead to new therapeutic approaches to treating infectious diseases.