A colonoscopy is a procedure where a gastroenterologist examines the inner lining of the large intestine and rectum using a thin flexible tube with a camera. It allows doctors to visually check for abnormalities like polyps and take tissue samples. Patients must undergo bowel preparation beforehand by following a clear liquid diet and taking laxatives. The procedure is mostly painless and performed as an outpatient procedure under sedation. Colonoscopies are recommended for people over 50 to screen for colorectal cancer.