During surgery on the small intestine or colon, the surgeon may decide to reroute the remaining part of the intestines to the outside of the body through an opening in the abdomen. The surgery to make this opening is called an ostomy.