Valich:
Temperature is regulated in the hypothalamus. Substances that induce fever are called pyrogens. These are both external or exogenous, such as the bacterial substance LPS, and internal or endogenous. The endogenous pyrogens (such as interleukin 1) are a part of the innate immune system, produced by phagocytic cells, and cause the increase in the thermoregulatory set-point in the hypothalamus. The endogenous pyrogens may also come directly from tissue necrosis.
The brain ultimately orchestrates heat effector mechanisms. These may be
increased heat production by increased muscle tone, shivering and hormones like epinephrine and thyroid hormones, or,
prevention of heat loss, such as vasoconstriction or crawling under a blanket.
The autonomic nervous system may also activate brown adipose tissue to produce heat (=non-exercise associated thermogenesis, also known as non-shivering thermogenesis), but this seems mostly important for babies. Increased heart rate and vasoconstriction contribute to increased blood pressure in fever.
Types
Pyrexia can be classed as
low-grade: 38 - 39 °C (99.5 - 102.2 °F)
moderate: 39 - 40 °C (102.2 - 104 °F)
high-grade: more than 40 °C or 104 °F
Hyperpyrexia: 107.6°F (42° C) or more.
The latter is clearly a medical emergency because it approaches the upper limit compatible with life.
Most of the times, fever types can't be used to find the underlying cause. However, there are specific fever patterns that may occasionally hint the diagnosis:
Pel-Ebstein fever is a specific kind of fever associated with Hodgkin disease, being high for one week and low for the next week and so on. However, there is some debate ([1]) wether this truely exists.
Typhoid fever may show a specific fever pattern, with a slow stepwise increase and a high plateau.
In malaria, there may be a fever with a periodicity of 48 hours (tertian fever) or 72 hours (quartan fever, indicating Plasmodium vivax). These patterns may be less clear in travelers.
Febricula[1] is a mild fever of short duration, of indefinite origin, and without any distinctive pathology.
Causes
Fever is a common symptom of many medical conditions:
infectious disease, e.g. common cold, HIV, malaria, infectious mononucleosis, gastroenteritis, etc..
Immunological diseases like lupus erythematosus, sarcoidosis, inflammatory bowel diseases, etc..
Tissue destruction, which can occur in hemolysis, surgery, infarction, crush syndrome, rhabdomyolysis, cerebral hemorrhageetc..
Drug fever
directly caused be the drug (e.g. progesterone, chemotherapeutics causing tumor necrosis)
as an adverse reaction to drugs (e.g. antibiotics, sulfa drugs, etc.)
after drug discontinuation, like with heroin withdrawl
Cancers such as Hodgkin disease (with Pel-Ebstein fever)
Metabolic disorders like gout, porphyria, etc..
Thrombo-embolic processes (i.e. pulmonary embolism, deep venous thrombosis)
Persistent fever which cannot be explained after repeated routine clinical inquiries, is called fever of unknown origin.
Is fever useful?
The mainstream medical answer is: no. That is: there is no definitive proof in warm-blooded species (and certainly not in humans) in vivo that they recover more rapidly from infections due to fever.
Of course, there is evidence that hints a possible role for the usefulness (and therefore, evolutionary role, from a Darwinistic point of view) of fever. It does have an effect in cold-blooded species, and there are certainly some important immunological reactions that are speeded up by temperature. Possibly, some pathogens with strict temperature preferences could be hindered.
Treatment
Fever should not necessarily be treated. Fever is an important signal that there's something wrong in the body, and it can be used for follow-up. Fever might help the immune system or hinder specific pathogens, but this is generally considered of little importance. Moreover, not all fevers are of infectious origin.
Most people take medication against fever because it causes discomfort. Fever increases heart rate and metabolism, thus potentially putting an additional strain on elderly patients, patients with heart disease, etc. This may even cause delirium. Therefore, potential benefits (if any) must be weighed against risks in these patients. In any case, fever must be brought under control in instances when fever escalates to hyperpyrexia, and tissue damage is imminent.
Treatment of fever should primarily be based on lowering the setpoint, but facilitating heat loss may contribute. The former is accomplished with antipyretics. Heat loss may be an effect of heat conduction, convection, radiation or evaporation (=sweating, perspiration). This may be particularly important in babies, to whom it is best not to give to much drugs. However, when someone would use water that is too cold, this induces vasoconstriction and prevents adequate heat loss.
WIKIPEDIA