Mammals control body temperature via a gland in the brain called the hypothalamus, according to Taber's Cyclopedic Medical Dictionary. The thermoregulatory center in this gland regulates heat loss and production. This center is influenced by nerve impulses from receptors near the skin and the temperature of the blood flowing through it.
When the environment is warm or hot, there are a variety of ways mammals stay cool. For instance, recent evidence suggests that there are certain chemicals in humans called heat shock chemicals that are released by cells that help us adjust to greatly increased temperatures. More commonly known ways to lower body heat include sweating, drinking cool water and panting, as seen in dogs. Seeking relief from the sun in warm dry climates is another way mammals, including humans, try to cool off.
Ways that mammals may increase their body temperature when the temperature in the environment is cold is through development of goose bumps, which reduces the amount of heat escaping the body. Shivering and countercurrent heat exchange are other methods. Shivering generates heat, thus making the body warmer. Countercurrent heat exchange occurs when internal heat is transferred from the body core to the periphery via special circulatory paths, as mentioned by science and technology writer Laura Klappenbach.