The procedure begins with the patient ingesting or receiving an enema containing barium sulfate. Once the barium coats the lining of the digestive tract, X-rays are taken to capture detailed images. The barium appears white on X-ray film, providing a clear contrast against the darker background of soft tissues. This enhanced visibility allows doctors to identify irregularities that may suggest the presence of cancer or other gastrointestinal issues.