A fever is not simply a rise in body temperature. We regularly get a little bit too warm -- when we're overdressed or when we overexert ourselves. Such an increase in temperature is usually brief, however. Our brain responds almost immediately, causing capillaries in the skin to dilate and sweat glands to perspire, all in an attempt to bring heat to the surface where it can be released.
A fever, in contrast, is caused by an upward shift in what scientists call the body's "set point." Just as the temperature inside your home is regulated by a thermostat, the body's set point is regulated by an area of the brain called the hypothalamus. Normally the body's set point remains at a constant temperature -- about 98.6 degrees Fahrenheit on average. In response to some infections, however, proteins called pyrogens, released by cells sent to fight bacteria and viruses, can cause the hypothalamus to reset its set point. This change creates the sensation of being cold, and the body responds accordingly by reducing blood flow to the skin, burning fat, and shivering, all to conserve and/or create excess heat.
Heat is the body's second line of defense against infection. While specialized immune cells called lymphocytes fight invading organisms directly, either by consuming them or by producing antibodies that destroy or otherwise interfere with them, a fever can make it much more difficult for microbes to replicate. Microbes have coevolved with human beings. Thus, their optimal temperature, the temperature at which they grow and replicate most efficiently, is also 98.6 degrees Fahrenheit. When the body responds to infection by increasing its temperature, most microbes have a much harder time replicating and can therefore be fought more easily by the body's first line of defense.
As with many things, however, more -- or in this case, higher -- is not always better. With fever, moderation is essential. In fact, a fever of 105 degrees Fahrenheit or higher can be dangerous. As cellular temperature rises, so too does the cellular rate of metabolism. The heightened metabolic rate produces more heat, which drives temperature higher still, setting up a vicious cycle. At temperatures above 109 degrees Fahrenheit -- less than 10 degrees higher than normal -- proteins begin to break down, or denature, leading to often permanent damage of the brain and other important tissues.