When a human body is affected by there is increase in Thermostat which is available in Hypothalamus it generally happens which your body engages with lot of physical effort in a very hot temperature in such case
the body heat increases but the Thermostat remains at around 37 degree which is actually a genuine temperature thermostat and in such case, the hypothalamus tries to correct this with sweating and increased blood flow to the skin.
With a fever, it is actually the thermostat that has adjusted. This means your body temperature is now below 36.8°C, so you feel cold and shiver, to try and raise your temperature. A rise in temperature helps in fighting infection as it powers up the production of white blood cells.
"hope you understood"