The rectum is the final segment of the large intestine, serving as a temporary storage site for feces before they are expelled from the body. It is approximately 12 cm long in adults and is located between the sigmoid colon and the anal canal, playing a crucial role in the process of defecation.