Mucus is a polymer. It is a slippery aqueous secretion produced by, and covering, mucous membranes. It is typically produced from cells found in mucous glands, although it may also originate from mixed glands, which contain both serous and mucous cells.

It is a viscous colloid containing inorganic salts, antiseptic enzymes (such as lysozymes), immunoglobulins, and glycoproteins such as lactoferrin and mucins, which are produced by goblet cells in the mucous membranes and submucosal glands. Mucus serves to protect epithelial cells (that line the tubes) in the respiratory, gastrointestinal, urogenital, visual, and auditory systems; the epidermis in amphibians; and the gills in fish, against infectious agents such as fungi, bacteria and viruses. Most of the mucus produced is in the gastrointestinal tract.

Bony fish, hagfish, snails, slugs, and some other invertebrates also produce external mucus. In addition to serving a protective function against infectious agents, such mucus provides protection against toxins produced by predators, can facilitate movement and may play a role in communication.

More Info: en.wikipedia.org