An endoscopy is a medical procedure used to visually examine the inside of a person's body, typically the digestive tract, using a flexible tube with a camera and light attached to it. The level of discomfort or pain associated with an endoscopy can vary depending on several factors, including the type of endoscopy being performed, the individual's pain tolerance, and the skill of the medical professionals conducting the procedure.