A colonoscopy is a procedure that allows a physician to visualise the mucosa (lining) of the colon in order to both aid diagnosis and perform certain treatments.
There are several reasons why your physician may decide to perform a colonoscopy.
These include investigation for the cause gastrointestinal bleeding, anaemia, changes in bowel habit or to screen for cancer or inflammatory bowel disease.

Prof. Hugh Mulcahy

You will be instructed to take liquids only after noon the day before your procedure. You should not drink after midnight before your procedure.
The day before the procedure, you must take a laxative.
You must inform the physician of any medical conditions you have and any medications you are on. Certain medications such as aspirin or warfarin may need to be stopped and this must be discussed prior to the procedure.
Due to the effect of sedatives, it is unsafe to drive even if you feel capable and therefore arrangements must be made for transport home after the procedure.

A colonoscopy is a short procedure that usually takes less than twenty-five minutes. A sedative is given intravenously prior to the procedure to help you relax. Analgesics (painkillers) may also be given to minimise any discomfort. These can be adjusted according to your needs.
You will be asked to lie on your side and to take slow deep breaths. The physician will initially perform a digital rectal examination, and then insert the endoscope, a long flexible instrument with a camera at the tip into your rectum.

Air is then blown into the colon.
The instrument is manoeuvred through the bends of the colon using controls which bend the tip; you may also be asked to change position. This transmits images of the colon onto a screen.
Polyps discovered during the procedure may often be removed. These are sent to a laboratory for analysis which determines whether they are benign or malignant. Biopsies (tissue samples) may also be taken during the procedure.
Any sources of bleeding may be cauterised (a method of stopping bleeding involving the burning of the affected vessel).
During the procedure you may feel mild cramping. You can reduce the cramping by taking several slow, deep breaths. When the doctor has finished, the endoscope is slowly withdrawn while the lining of your bowel is carefully examined.
After a recovery time, during which the sedative wears off, you will receive instructions from your physician regarding some symptoms to look out for, such as blood in your stool, feeling faint or dizziness, and you may also be advised to modify your medications for a certain period. Flatulence and abdominal cramping is common after the procedure, due to the role of air insufflation. However these do not last more than a few days.

Complications or colonoscopy are very rare.
The most serious complication is a tear or hole in the lining of the colon called a gastrointestinal perforation, which is life-threatening and requires immediate surgery for repair; however, the rate of perforation is less than 1 in 2000 colonoscopies.
Bleeding that occurs during the procedure may be treated as part of the procedure.
Delayed bleeding may occur following removal of a polyp. This may require repeat colonoscopy for cauterisation of the bleeding vessel.