The rectum is a straight, 8-inch chamber that connects the colon to the anus. The rectum’s job is to receive stool from the colon, let you know that there is stool to be evacuated (pooped out) and to hold the stool until evacuation happens. When anything (gas or stool) comes into the rectum, sensors send a message to the brain. The brain then decides if the rectal contents can be released or not.
If they can, the sphincters relax and the rectum contracts, disposing its contents. If the contents cannot be disposed, the sphincter contracts and the rectum accommodates so that the sensation temporarily goes away.