It was a miserable day and I was, as usual, driving to work with my friend. It was also in the middle of cold and flu season and she had been struck down with the dreaded lurgy...

She paused for a brief coughing fit, blew her nose and embarrassed by what had just been expelled from her body apologised and turned to me and said: "This is soooo disgusting... what makes phlegm and snot green?" I didn't have and answer to this, which got me thinking - "what are they and what do they do?"

Both phlegm and snot, or nasal mucus to use its more polite medical term, are names given to mucus produced in the respiratory system. Nasal mucus, as the name suggests is produced at the back of the nose, while phlegm is used to describe the mucus from the rest of the respiratory system and is typically used to describe the gloop that is coughed up.

Contrary to what you might think, mucus is vital for good health. It helps to protect the lungs and also prevents tissues from drying out. It's a water-based liquid that contains proteins, carbohydrates, salt and some cells. The primary type of protein are the mucins, which have a sugar coating that enables them to absorb large quantities of water. This gives mucus its characteristic consistency and wetting properties. Apart from the mucins, the other proteins present hold the key to the protective functions of mucus. These include antibodies that kick start the body's defences against invading pathogens (disease causing agents such as bacteria, viruses and fungi) and antiseptic enzymes, such as lysozyme, that can directly kill bacteria.

Mucus can also protect the lungs because it is sticky meaning that it can trap particles of dust, dirt, bacteria and pollen that could otherwise cause irritation and infection. But once the particles are firmly lodged like this they need to be disposed of and this is achieved by coughing, sneezing and nose-blowing.

The average sneeze can propel a mucus missile and its microbial passengers at up to 100 miles per hour, hence the saying "coughs and sneezes spread diseases", and as well as sneezing there is of course nose blowing. But much to the disgust of many a reader, the vast majority of our mucus is in fact eaten! Our airways are lined with millions of tiny hairs, called cilia. These beat in synchrony to produce waves of movement, a bit like how a Mexican wave moves around a football stadium. These waves sweep the mucus to the back of the throat where it is swallowed. Stomach acid then takes care of most of the things inside that could be infectious. But if the mucus dries out and hardens before it can be ferried to the throat it can produce an unsightly bogey!

But where does the mucus come from?

Mucus is secreted by mucous membranes, of which there are many on the human body. Mucous membranes are a lining of cells, continuous with the skin, which protect the cavities and canals of the body that come into contact with the outside world, including our lips, ears, nostrils, mouth, digestive tract, genitals and anus.

Within the mucous membrane is a specialised cell type which, due to its characteristic shape, is known as a goblet cell. The sole function of the goblet cell is to produce mucus, although other cells can make it too. The mucin proteins are packaged in small sacks, called vesicles, which then make their way to the edge of the cells. They subsequently fuse with the membrane (plasma membrane) that surrounds the cell, enabling the contents to be released. As the mucin is released and soaks up water it can expand up to 600 times, which is potentially a lot of snot! Indeed, it is estimated that a healthy nose will pump out more than a pint of mucus a day, although the amount can vary enormously; for example when you cry most of your tears will run into the nose and mix with the mucus, increasing its volume. This is why crying is often accompanied by a runny nose. Also, as one of the roles of mucus is to remove particles, mucus production is stimulated by airway infection and irritation. For example, hayfever sufferers may experience a runny nose as the body attempts to flush out the problem pollen that's triggering the effect. Rhinitis like this occurs when the body's immune system responds to an allergen such as pollen by releasing the inflammatory chemical histamine, which instructs the mucous membranes to increase their mucus production.

So can we cut mucus production?

Obviously you can't live without mucus, but can anything be done when the body goes into overdrive? There are two types of drugs which can help: decongestants and antihistamines. A stuffed up nose is caused when mucus gets trapped behind swollen nasal passages. They become swollen because of increased blood flow to the area, which occurs so that more infection-fighting white blood cells can reach the point of infection. So decongestants can help by shrinking the blood vessels and cutting down the blood flow, reducing the swelling. So if you have a runny nose then antihistamines can help by blocking histamine-induced stimulation of mucus production.

If you don't want to use medicines to help, there are some alternatives. One thing that could help during a cold is to use a humidifier. This increases the amount of water in the air, which in turn increases the water content of the mucus. The result is thinner mucus that can leave the nose more easily. But don't forget the other obvious solution - nose blowing, although there is some evidence to suggest that wiping is better than blowing. This is because the sinuses are normally filled with air and do not produce significant amounts of mucus. However, with nose blowing, sticky gloop can be seen in the sinuses of around 85% of people with a cold. So how does it get there? Scientists from the University of Virginia, Charlottesville, showed that the pressure built up when blowing your nose is enough to force the mucus into the sinuses. They also showed that this is unlikely to occur as a result of coughing or sneezing. And since, if you have a cold, the mucus is packed with virus particles, vigorous nose blowing could theoretically carry the infection into the sinuses. However, the jury is still out as to whether blowing your nose really does increase this risk. Reassuringly, people with colds rarely get acute sinus infections. But, it may still result in increased discomfort and duration of the cold. So maybe the safest solution lies with the frequently preferred choice of children - their index finger (for nose picking).

So why is snot green?

Phlegm and snot actually come in a variety of hues, rather than just green, although the colour can help to indicate the health of the person producing it. The phlegm of a healthy person is typically white or clear, although during the early stages of a cold, which can also be the most contagious, the phlegm can still be clear. Brown and brown-grey phlegms are common in smokers and are caused by cigarette tar sticking to the mucus. Rusty coloured phlegm or phlegm with rusty spots in it can be a sign of more serious illness such as pneumonia or bleeding from an airway, which, apart from infection, can also be a consequence of cancer. Then on to the yellow and green phlegms. These typically indicate infection and in some cases this can be severe; bronchitis, for example, is often accompanied by green phlegm. But that still doesn't quite answer the question. Infections cause phlegm to change colour, but where does that colour come from? The answer lies in the immune response and more specifically a type of white blood cell called neutrophils.

When a part of the body becomes infected it produces signals to alert the immune system to the developing problem. Cells and other immune components follow these signals by a process called chemotaxis to home in on the affected area. In the case of colds, white blood cells called neutrophils are amongst the first on the scene and arrive via the blood stream. Upon arrival the neutrophils mount an attack. They attempt to engulf (swallow) the pathogen (a virus in the case of colds) and at the same time they produce antiseptic chemicals that wipe out other pathogens nearby. These chemicals are so potent that even the neutophils don't escape and are destroyed, committing suicide to fight the spread of infection. Generally, enzymes are responsible for the production of the antiseptic chemicals and it is these that give mucus the green colour. Enzymes often require 'helpers', called co-enzymes, to function properly and it is more specifically the co-enzyme iron (ferrous form) that lends the green colour to mucus. One such iron containing enzyme in neutrophils is myeloperoxidase. Myeloperoxidase produces the antiseptic chemical hypochlorous acid, the type of bleach commonly used to sanitise swimming pools. Interestingly, it is similar iron containing enzymes in wasabi that make it green too.

So, I finally have the answer to the question my friend posed and the next time someone asks me why their snot is green, I'll have the answer to hand: iron containing enzymes, the same reason wasabi is green, but thankfully snot is not as hot!