system
Given the following post, respond as if you're commenting on Reddit:
human
Why does fever happen?

So I had a major infection two weeks ago and spent 4 days in a hospital, during which I had fever of 40 degrees celcius, that's why it stroke me, ¿what purpose does this body reaction serve?

Thanks in advance for responses.
gpt
Fever is an awesome topic as well as the constellation of things that happen during "sickness" or "acute phase response". A few things are at play during a fever.

1. Most human pathogens proliferate poorly above 39C. Almost none of them will die at this temp but their growth rate will be slowed.

2. Neutrophil activity and mobility increase

3. interferon production increases

4. cytokine release (that helps to maintain pyrogen release)

5. DECREASE in plasma iron concentrations. All microorganisms require iron uptake, the body starts sequestering as much as it can to reduce the availability to pathogens.

6. increase in triglyceride levels. Things like VLDLs are good at binding bacterial enterotoxins

7. increase in sleepiness. The sick need to sleep.

8. Decrease in appetite. Paradoxical since the basal metabolic rate needs to increase to produce a fever. Thoughts are lowered intake may be to reduce iron absorption and possibly from an evolutionary standpoint because resting animals usually survive predation. 

How it happens, complex but cool...

1. your immune system produces signaling molecules (pyrogens) that travel to the brain in the blood when they encounter things like bacteria, viruses, etc...

2. a few small spots in the brain are not protected by the blood-brain barrier so they can "taste" the chemical makeup of the blood. One of these (organum vasculosum of the lamina terminalis for you anatomy nerds) areas lets neurons in the hypothalamus bind with the pyrogens. These neurons fire when your body goes above 37C so when we turn them off the signal that we're hot is now not as vigorous, our new "set-point" temperature will be higher...

3. Not the whole story though. Fever usually sets in about 30 minutes before pyrogens reach your brain...If you block the vagus nerve this 30 minute early onset doesn't happen. Most likely the vagus is stimulated in the liver and signals the onset of the fever while the pyrogens continue to maintain the new set point until the immune system's activity returns to normal.