A colostomy and an ileostomy are both procedures where a surgeon connects parts of the intestines to an opening in the abdomen where stool drains out. Another term used for the opening created on the outside of the body is called a stoma.