The mutant CFTR leads to the disease as the incorrect protein folding is detected in the endoplasmic reticulum which leads the protein to be degraded and thus never reaches the cell membrane whereas with a normal CFTR protein, the protein actually reaches the cell membrane and is integrated into it.
CFTR works as a channel that exports chloride ions across the membrane; this is the function that is affected when the gene is mutated.