The host immune system must constantly monitor the gastrointestinal tract for the presence of pathogens, while tolerating trillions of commensal microbiota. The mechanisms that maintain intestinal immune homeostasis are not fully understood, but it is clear that intestinal microbiota actively modulate the immune system to maintain a mutually beneficial relationship. Here we review recent findings on the ways in which intestinal microbiota shape immune development and responses. These have revealed that a range of microbiota derivatives can influence host immune functions, by targeting various cell types in the gut, including intestinal epithelial cells, mononuclear phagocytes, innate lymphoid cells and B and T lymphocytes. Although challenges remain, harnessing this knowledge could lead to new therapies for intestinal and systemic immune disorders.