An endoscopy is a procedure where the inside of the body is examined internally using an endoscope which is a thin, long, flexible tube that has a light source and a video camera at one end. Images of the inside of your body are relayed to an external television screen.
Endoscopes can be inserted into the body through a natural opening, such as through the throat or anus. Alternatively, it can be inserted through a small surgical incision that is made in the skin.
Definition from NHS Choices: Endoscopy