People with cystic fibrosis have a faulty gene which means they produce excess amounts of mucus. Lots of this mucus is produced in the airways and tends to build up in the lungs. The function of mucus is to trap pathogens, things like viruses and bacteria that can cause illness and make you unwell. Normally, mucus is coughed out of the airways by the movement of small hairlike projections called cilia and then swallowed, going to the stomach where the stomach acid kills the bacteria. However, for people with cystic fibrosis, they are producing too much mucus and as mentioned before not all of it can move out of the airways as it is thick, stopping the cilia from moving effectively. This means that there are more pathogens active in the lungs which can easily reproduce and multiply quickly so can go on to cause illness. This explains why people with cystic fibrosis are more likely to have chest infections.