A barium swallow is a diagnostic procedure that involves the ingestion of a barium sulfate contrast solution. This radiopaque substance helps to visualize the structure and functioning of the esophagus, stomach, and the first part of the small intestine during an X-ray examination.