system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:Why does our body try to cool itself down when we have fever, even though the body heated itself up on purpose

As I understand fever is a response of our body to a sickness. Our body heats up to make the disease in our body weaker, but when we get hot we start sweating which makes us cool down.
Why do we have these 2 completely opposite reactions in our body?
gpt
Your body has a internal thermostat, called the hypothalamus. This thermostat can be adjusted. Sweating occurs when your body temperature is above thermostat level to cool your body down. When you have a fever your thermostat is set higher than normal. This is why you can feel cold even though you have a fever, because even though your body temperature is higher than normal it is still below thermostat level. When your fever breaks and the thermostat goes back to normal level, you will start sweating as the body temperature is now above thermostat level.