How does the skin help to regulate body temperature?

The skin has sweat glands which excrete sweat. These glands help in regulating body temperature because when it is hot the glands excrete the heat from the body through sweat and when it is cold the vessels are hidden deeper inside the skin to help retain the warmth.