Endoscopy is a medical procedure used to visualize the internal organs of the body. A long, thin tube with a camera and light at the end is inserted through a natural opening or a small incision to examine tissues, organs, or cavities in the body. It is commonly used to diagnose and treat various medical conditions.