Endoscopy is a procedure where a flexible tube with a light and camera is used to examine the interior surfaces of organs. It is particularly useful for detecting cancers in the gastrointestinal tract, such as esophageal, stomach, and colorectal cancers. Types of endoscopy include colonoscopy, gastroscopy, and bronchoscopy.