The rectum is the part of the large intestine that lies immediately before the anus, and it functions as a storage site for feces before they are eliminated from the body. It is an important part of the digestive system and plays a key role in eliminating waste from the body.