Hypothalamus, part of brain responsible for our nervous system control, also manages temperature of the body like a thermostat. It sees that temperature remains with in 2 degrees of 98.6 F.
It works in coordination with sweat glands, skin, blood vessels which are respectively condensors, vents and ducts for the cooling system of our body.
When it is hotter outside the body, the sweat glands bring the water inside the skin to the surface of the skin. The water evaporates through the vents. The heat required for evaporation is supplied by our body. So body cools down.