Cystic fibrosis is caused by mutations in the CFTR gene (Cystic Fibrosis Transmembrane Conductance Regulator). This gene is responsible for producing a protein that regulates the movement of salt and water in and out of cells. Mutations in the CFTR gene impair this function, leading to the symptoms of CF.