The CFTR gene mutation disrupts the function of the CFTR protein. Normally, this protein helps maintain the balance of salt and water in various tissues by acting as a channel for chloride ions. When the gene is mutated, the protein's function is compromised, resulting in the buildup of thick mucus.