The large numbers of microorganisms that inhabit mammalian body surfaces have a highly coevolved relationship with the immune system. Although many of these microbes carry out functions that are critical for host physiology, they nevertheless pose the threat of breach with ensuing pathologies. The mammalian immune system plays an essential role in maintaining homeostasis with resident microbial communities, thus ensuring that the mutualistic nature of the host-microbial relationship is maintained. At the same time, resident bacteria profoundly shape mammalian immunity. Here, we review advances in our understanding of the interactions between resident microbes and the immune system and the implications of these findings for human health.