To peacefully coexist with the microbial inhabitants of the intestine, mammals have evolved elaborate and interconnected regulatory mechanisms to maintain immune homeostasis in the face of potential infection and tissue damage by pathogenic microorganisms. Physical barriers, antimicrobial factors and secretory antibodies act in concert to keep microbes at a distance from the epithelium and initiate repair mechanisms in the event of damage. Commensal bacteria are not ignored but dynamically controlled via many complex overlapping and intertwined mechanisms involving intestinal epithelial cells (IECs) and signals from the microbiota. Polarized IECs play a decisive role in homeostasis by regulating the expression and activity of the pattern-recognition receptors (PRRs), in different compartments of the intestine. The differential signaling and expression of receptors on apical and basal membranes of the epithelium also plays its part in distinguishing commensals from harmful invaders. In steady state conditions macrophages and dendritic cells (DCs) in the lamina propria (LP) are conditioned by environmental factors to induce immune tolerance. The distinction between pathogen and non-pathogen is linked to the ability of pathogens to invade and cause damage to the host cells and tissues. This induces local inflammatory responses and the attraction of capillary leukocytes by chemokines released from colonized and invaded epithelial cells. This bypasses the tolerogenic mechanisms controlling the responses of resident DCs and macrophages leading to pathogen killing and adaptive immune responses. Research on this topic has important implications for the development of novel therapeutic approaches to treat or prevent inflammatory bowel disease (IBD), inflammation-related cancer and other gut-related diseases and disorders.