If you're outside and have sweated a great deal or are excessively thirsty, get out of the sun. If you must be out during the warmer part of the day (between 10:00 a.m. and 2:00 p.m.), rest frequently in a shady area safely away from the sun's burning rays.
If your thirst is due to sweating or overexertion of any kind, drinking plain water will not suffice as it can't replace the lost electrolytes in your system. This isn't a product endorsement but Gatorade actually helps replace lost electrolytes when someone needs to rehydrate. If you only have water available, make sure you consume it with something salty such as pretzels or crackers.
Besides water and salty foods, such as crackers or pretzels, eat snacks that are sweet and high in carbohydrates. Therefore, a few cookies won't hurt nor a sweet drink like orange juice. Both will re-hydrate your body so you can feel better again.
If you've been sweating or have lost a good deal of fluid through exercise, by no means should you drink alcohol as this can worsen the condition.