An endoscope operates on principles similar to a telescope - it uses lenses or fiber optics to illuminate and view internal body cavities. Like a telescope, it's an optical instrument designed for viewing, but it's narrow and flexible for medical use.