>>11773830depending on the type of hair it works differently
in this case the hair acts a shade protecting from the sun and creates a thermal stand off as the hair tips heat up before the skin a that is hit first by the sunlight allowing more space for cooling effects. This is also why you see them wrapped up head to toe, get the cloths to get hot before they get heated directly.
It also wicks sweat away and creates a larger evaporation surface to help with cooling.
Some hair helps keep you warm, other hair types help keep you cool. Some hair types in animals even act as armor. So don't over simply such a complex thing as hair.