When the body temperature increases, the hypothalamus (a part of the brain) sends signals to the sweat glands and blood vessels in the skin. The sweat glands produce sweat, which evaporates and cools the body down. The blood vessels dilate, allowing more blood to flow near the skin's surface, which also helps to dissipate heat. These responses work together to bring the body temperature back to normal.
When the body temperature decreases, the hypothalamus sends signals to the muscles to cause shivering. Shivering generates heat, which helps to raise the body temperature. The blood vessels in the skin constrict, reducing blood flow to the skin's surface and helping to conserve heat. These responses work together to bring the body temperature back to normal.