A colonoscopy is a procedure used to examine the inside of the colon and rectum for abnormalities, such as polyps, ulcers, or cancer. It is recommended as a routine screening for colorectal cancer starting at age 45 or earlier for individuals with risk factors.