Temperature is controlled by the hypothalamus - if blood temp is too high, this triggers nervous impulses in the autonomic nervous system, which switches on cooling mechanisms and vice versa
When temperature is too high:
Detected by thermoreceptors in hypothalamus and skin - causes vasodilation/hair lies flat and sweating - temperature decreases back to optimum
When temperature is too low:
Detected by thermoreceptors in hypothalamus and skin - causes vasoconstriction/hair is erect/shivering - temperature increases back to optimum