While running/exercising our body temperature increases. Sweat is developed in our body to decrease this increased body temperature to cnormal level.
During sweating your body loses a lot of water and needs to replace it. Thirst is an indicator for your body to get more of the life saving liquid inside. That's why you become thirsty & drinks water.