The mucus layer coating the gastrointestinal tract is the front line of innate host defense, largely because of the secretory products of intestinal goblet cells. Goblet cells synthesize secretory mucin glycoproteins (MUC2) and bioactive molecules such as epithelial membrane-bound mucins (MUC1, MUC3, MUC17), trefoil factor peptides (TFF), resistin-like molecule beta (RELMbeta), and Fc-gamma binding protein (Fcgbp). The MUC2 mucin protein forms trimers by disulfide bonding in cysteine-rich amino terminal von Willebrand factor (vWF) domains, coupled with crosslinking provided by TFF and Fcgbp proteins with MUC2 vWF domains, resulting in a highly viscous extracellular layer. Colonization by commensal intestinal microbiota is limited to an outer "loose" mucus layer, and interacts with the diverse oligosaccharides of mucin glycoproteins, whereas an "inner" adherent mucus layer is largely devoid of bacteria. Defective mucus layers resulting from lack of MUC2 mucin, mutated Muc2 mucin vWF domains, or from deletion of core mucin glycosyltransferase enzymes in mice result in increased bacterial adhesion to the surface epithelium, increased intestinal permeability, and enhanced susceptibility to colitis caused by dextran sodium sulfate. Changes in mucin gene expression and mucin glycan structures occur in cancers of the intestine, contributing to diverse biologic properties involved in the development and progression of cancer. Further research is needed on identification and functional significance of various components of mucus layers and the complex interactions among mucus layers, microbiota, epithelial cells, and the underlying innate and adaptive immunity. Further elucidation of the regulatory mechanisms involved in mucin changes in cancer and inflammation may lead to the development of novel therapeutic approaches.