Endoscopy is a way of looking inside the body using a flexible tube that has a small camera on the end of it. This instrument is called an endoscope.
Small instruments can be inserted through an endoscope and used to:
Look more closely at an area inside the body
Take samples of abnormal tissues
Treat certain diseases
Remove tumors
Stop bleeding
Remove foreign bodies (such as food stuck in the esophagus -- the tube that connects your throat to your stomach)