The mammalian intestinal tract harbors a diverse community of trillions of microorganisms, which have co-evolved with the host immune system for millions of years. Many of these microorganisms perform functions critical for host physiology, but the host must remain vigilant to control the microbial community so that the symbiotic nature of the relationship is maintained. To facilitate homeostasis, the immune system ensures that the diverse microbial load is tolerated and anatomically contained, while remaining responsive to microbial breaches and invasion. Although the microbiota is required for intestinal immune development, immune responses also regulate the structure and composition of the intestinal microbiota. Here we discuss recent advances in our understanding of these complex interactions and their implications for human health and disease.