A colostomy is an opening that connects the colon to the surface of the abdomen. This is called a stoma and it provides a new path for waste material and gas to leave the body. A colostomy can be either permanent or temporary.

How is a colostomy performed?

A colostomy results from a surgical procedure performed under general anesthesia. During the surgery, healthy colon is brought through an opening in the abdominal wall and stitched to your skin. Unlike the anus, the opening (stoma) has no sphincter muscle, so you cannot control the exit of waste. You will need to wear a pouch (called an ostomy collecting device) to collect the waste flow.

What are the complications of a colostomy?

In some cases, skin irritation can result from stool that leaks under the pouch. A hernia can develop around a colostomy. The bowel may become narrow or it may prolapse, which means it gets longer. Proper fitting of an ostomy pouch can help prevent skin irritation.

http://my.clevelandclinic.org/disorders/colorectal_cancer/hic_colostomy.aspx 
http://www.webmd.com/colorectal-cancer/guide/living-colostomy