The lining of the epithelial tissue forming the mucus membrane contains some specialised cells which are called the Goblet cells.
These cells secrete a slippery substance called the Mucus.
The Mucus is a dense, aqueous and slippery substance that is composed of anti-microbial enzymes like lysosyme, immunoglobulins (antibodies) and glycoproteins like mucins.
The mucus secreting cells line the internal tracts of the body that come into contact with outside environment, like the respiratory tract, alimentary canal, urino-genital tract.
If any microbial pathogen gain access into any of these tracts the lysosyme in the mucus causes the microbial cells to undergo lysis, hence killed.
The immunoglobulins, on recognising a pathogen, activate the immune cells of the body to fight against the intruding pathogen.