The cystic fibrosis transmembrane conductance regulator (CFTR) gene encodes a protein that functions as a channel for chloride ions across cell membranes. Mutations in the CFTR gene disrupt this channel's function, leading to thick, sticky mucus production in various organs. This mucus buildup causes the hallmark symptoms of cystic fibrosis, including chronic respiratory infections and digestive issues.