An ostomy bag is used to allow waste to leave the body without irritating the lower parts of the digestive system. A surgical procedure is performed to create a new pathway (known as a stoma) for waste to exit the body, and this waste is collected in an ostomy bag.