The job of the immune system is to defend the body against infectious organisms and other intruders. This occurs primarily through the actions of white blood cells. Phagocytes destroy non-native cells and organisms, while lymphocytes learn from infections and allow the body to fight repeated infections more easily. Immunization uses lymphocytes to increase the body's defense against illness by training the cells to target weakened or dead infectious cells.
Many of the symptoms of illness that sufferers associate with a particular virus or bacterial infection are, in fact, the body's own immune system trying to rid the system of the intruder. For example, when the body detects the common rhinovirus cold, it triggers membranes to produce an excess of mucus to prevent further intruders and to flush out those already in the body. Increased body temperature helps to damage invading microorganisms, and an increased cough response helps to clear the lungs. Even the symptoms of diarrhea are an immune response, an attempt to remove potential contaminants from the digestive system.
The body's immune system can also be a hindrance, in some cases. Some illnesses and allergies are caused by an overactive immune system, targeting the body's own cells or relatively harmless intruders instead of potential pathogens. Rheumatoid arthritis, for instance, is caused by the immune system targeting joints and causing damage.