A colonoscopy is a medical procedure used to examine the interior lining of the large intestine (colon and rectum). It is commonly performed to detect changes or abnormalities such as swollen tissue, polyps, or cancer. The procedure is conducted using a long, flexible tube called a colonoscope, which has a camera and light at its tip.