Contrast agents are substances used in medical imaging to enhance the visibility of internal body structures. They work by altering the contrast of the images obtained through techniques such as MRI, CT scans, and ultrasound. These agents can be administered orally, intravenously, or rectally, depending on the imaging requirement.