An ostomy is surgery to create an opening (stoma) from an area inside the body to the outside. It treats certain diseases of the digestive or urinary systems. It can be permanent, when an organ must be removed. It can be temporary, when the organ needs time to heal. The organ could be the small intestine, colon, rectum, or bladder. With an ostomy, there must be a new way for wastes to leave the body.