A colonoscopy is a diagnostic procedure that allows doctors to examine the inner lining of the colon and rectum using a flexible camera-equipped tube. It helps detect colon polyps, colorectal cancer, inflammation, bleeding, and other digestive disorders.