In the past decade it has become clear that the gut constitutes an important frontier of the body, which not only regulates the selective entry of nutrients while keeping vigilant against pathogens but also is largely responsible for shaping the immune response to educate the organism to recognize self from non-self. The very notion of self has undergone a dramatic change, with the acknowledgment that our 'selves' include a plethora of microbial species that actively participate in our body's homeostasis. The immune system continuously adapts to the microbiota in a cyclic, dynamic cross talk where intestinal epithelial cells play an important role in instructing noninflammatory responses for a steady-state control of bacterial growth, or triggering inflammatory mechanisms that can clear the gut from harmful invaders. The system is complex and robust in the sense that many players with partially overlapping roles act to keep the integrity of the intestinal mucosal barrier. Failure of these mechanisms involves genetic and environmental triggers and leads to inflammatory bowel disease. In this review, we seek to collect the state-of-the-art knowledge about how host and microbiota interact to promote gut homeostasis and provide evidences of malfunctioning of the described mechanisms in human inflammatory bowel disease.