In hot environments, blood vessels under the surface of the skin dilate to allow more blood to flow through them. This causes more heat to be lost from the blood to the environment so body temperature decreases to a normal level.
In cold environments, the opposite occurs and the blood vessels under the surface of the skin constrict. This makes it harder for blood to flow through them and less heat is lost from the blood to the environment. Body temperature is able to increase back to a normal level.