Endoscopy involves using an endoscope, a flexible tube with a light and camera, to examine the inside of the body. Originally, crude endoscopes used oil lamps for illumination, but the development of fiber optic technology greatly improved endoscopy. Today, endoscopy is commonly used to diagnose and treat conditions in the gastrointestinal, respiratory, and urinary tracts by allowing physicians to visually inspect and access internal organs. It has become an important medical procedure with few risks when performed properly.