The digestive system is composed of the gastrointestinal tract, which includes the mouth, pharynx, esophagus, stomach, small intestine, and large intestine. Its primary function is to ingest food, break it down mechanically and chemically, absorb nutrients, and excrete waste.