Endoscopy is a minimally invasive diagnostic medical procedure that allows doctors to examine the interior surfaces of an organ or tissue using an endoscope. It is commonly used for diagnosing conditions in the gastrointestinal tract, respiratory system, and other internal organs, often aiding in both diagnosis and treatment without the need for large incisions.