Fever is caused either outside or inside the body. Micro-organisms such as bacteria and parasites produce a substance called chemical poisons. This poison causes the white blood cells to produce a substance called pyrogens which in turn causes fever.
Fever occurs when your body's thermostat shifts the set point of your normal body temperature to higher. During this time you may feel cold and so start adding a layer of clothing or wrap up in a blanket, or you may be shivering to generate more body heat, which results in an increase in body temperature.
It is caused by the following:
Colds and flu
Infections of the ear, lung, skin, throat, bladder or kidney
Gastroenteritis stomach bugs
Side effects of drugs
Infections from outside, such as malaria
Autoimmune diseases such as lupus, rheumatoid arthritis and inflammatory bowel disease
As a whole one could say fever is not contagious; however, if the fever is caused by a viral or bacterial infection, then it is a contagious infection.