The pharynx is a muscular tube in the throat that serves as a passageway for both air and food, connecting the nasal and oral cavities to the larynx and esophagus. It plays a crucial role in breathing, swallowing, and speaking.