The immune system has coevolved with extensive microbial communities living on barrier sites that are collectively known as the microbiota. It is increasingly clear that microbial antigens and metabolites engage in a constant dialogue with the immune system, leading to microbiota-specific immune responses that occur in the absence of inflammation. This form of homeostatic immunity encompasses many arms of immunity, including B cell responses, innate-like T cells, and conventional T helper and T regulatory responses. In this review we summarize known examples of innate-like T cell and adaptive immunity to the microbiota, focusing on fundamental aspects of commensal immune recognition across different barrier sites. Furthermore, we explore how this cross talk is established during development, emphasizing critical temporal windows that establish long-term immune function. Finally, we highlight how dysregulation of immunity to the microbiota can lead to inflammation and disease, and we pinpoint outstanding questions and controversies regarding immune system–microbiota interactions.