It's a medical device consisting of a scope with a charge-coupled camera embedded on the tip, used to see the insides by inserting into the body through the mouth or anus for the purposes of medical examination and diagnosis, or sexual roleplay resembling such.
Endoscopes used for examining the upper gastrointestinal tract are also called 'gastroscopes'.