Sweating is a way of regulating body temperature. When you are cold you shiver to warm up, and when your body overheats you sweat. The sweat evaporating from your skin cools you down.
Which species have them?
Cold-blooded animals, like fish, reptiles and amphibians, do not regulate their body temperatures and so they do not sweat. Only mammals have this ability.
Sweating keeps us cool, but some animals also use it to mark out their territories. As sweat carries a distinct scent, the marks can then be detected by other animals.
Most mammals have lots of sweat glands in their hands and feet, which makes it easy for them to rub the sweat, or scent, onto the markers around their territory.
Mammals may be the only animals who can sweat, but this does not mean that sweating is the main way of keeping cool for all of them.
Dogs have sweat glands but they also pant to keep cool.
Other mammals that spend a lot of time in the water, such as hippos, use the water to reduce their body temperature.
Nonetheless, sweat glands are a common characteristic among many mammals and provide evidence of our shared ancestry.