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.
There are many different types of ostomy. Some examples are
NIH: National Institute of Diabetes and Digestive and Kidney Diseases