Snot, or nasal mucus, serves important protective functions in the nose. It is produced by mucous membranes and is mostly made of water and mucin. Mucus moisturizes the inside of the nose and traps particles like dust and bacteria using tiny hairs called cilia. When an infection is present, mucus carries bacteria and dead cells, which is why it can sometimes turn yellow. Mucus is sticky because it contains long protein strands made of sugars and proteins that help it stretch and filter particles in the nose.