Colonoscopy is a safe procedure. A colonoscope is placed inside the rectum which is a long thin tube in which a micro camera is placed which makes the doctor able to see issues inside and treat it accordingly.
This process is performed with the help of super specialized machines.