The esophagus is a muscular tube that connects the throat to the stomach. Its primary function is to transport food and liquids from the mouth to the stomach through a series of muscular contractions known as peristalsis. The esophagus also contains a sphincter at the lower end to prevent backflow of stomach contents.