The temperature of the body is detected by the thermoregulatory centre in the hypothalamus in the brain, which can detect the temperature of the blood. Therefore it recieves information about changes to the skin temperature and initiates various responses in the body which help to maintain homeostasis of the core body temperature.
Three such changes are-
Sweating - production of sweat by the sweat glands helps to cool the skin when the hypothalamus detects that the body temperature is rising. Sweat is an isotonic solution containing chloride and sodium ions. Sweating increases heat loss due to the evaporation of sweat from the skin which cools the body down.
Blood vessel dilation - this also occurs in hot temperatures and is the dilation of blood vessels known as capillaries in the skin, which allows increased loss of heat to cool the body
Shivering - in cold temperatures the body shivers. This is due to increased muscle tone in cold temperatures. The rapid muscle contraction when you shiver requires respiration in muscles which results in increased heat production and therefore a raised body temperature.