A colonoscopy is a visual examination of the lining of your bowel. It is performed by passing a small flexible tube through the rectum into the colon.