Sweat glands are part of the excretory system. They are very similar to the urinary bladder. They hold waste liquids until it is time to dispose of them.
Unlike the bladder, sweat glands are controlled by involuntary* muscles. The process is called perspiration or sweating.
Typically when you get hot, the sweat glands excrete this liquid waste. The evaporation of sweat cools your body.
When you notice that you are sweating, you should drink water to replace that liquid in your body. Without replacing it, you could dehydrate*.

