Secretin is a peptide hormone produced by the S cells of the duodenum that plays a crucial role in regulating the pH of the small intestine by stimulating the pancreas to release bicarbonate-rich fluids. It also modulates the secretion of gastric acid and influences water homeostasis throughout the body.