Answer:
This happens due to the internal thermostat of the body, this is called the hypothalamus and it is a brain gland that orders the muscles to tremble to generate heat with them.
On the other hand, body temperature rises when we do exercise due to increased metabolism because we need to reach an optimum temperature for muscle contraction.