Gastrointestinal motility results from coordinated contractions of the tunica muscularis, the muscular layers of the alimentary canal. Throughout most of the gastrointestinal tract, smooth muscles are organized into two layers of circularly or longitudinally oriented muscle bundles. Smooth muscle cells form electrical and mechanical junctions between cells that facilitate coordination of contractions. Excitation-contraction coupling occurs by Ca(2+) entry via ion channels in the plasma membrane, leading to a rise in intracellular Ca(2+). Ca(2+) binding to calmodulin activates myosin light chain kinase; subsequent phosphorylation of myosin initiates cross-bridge cycling. Myosin phosphatase dephosphorylates myosin to relax muscles, and a process known as Ca(2+) sensitization regulates the activity of the phosphatase. Gastrointestinal smooth muscles are 'autonomous' and generate spontaneous electrical activity (slow waves) that does not depend upon input from nerves. Intrinsic pacemaker activity comes from interstitial cells of Cajal, which are electrically coupled to smooth muscle cells. Patterns of contractile activity in gastrointestinal muscles are determined by inputs from enteric motor neurons that innervate smooth muscle cells and interstitial cells. Here we provide an overview of the cells and mechanisms that generate smooth muscle contractile behaviour and gastrointestinal motility.