Summer is peak season for taking advantage of everything that Yosemite National Park offers, from waterfall watching and swimming in the valley to hiking and backpacking in the high country of the Sierra Nevada. Whenever you're outdoors, apply (and reapply) sunscreen with a high SPF factor, as well as wear a hat and sun-protective clothing to avoid getting burned.
The hottest days of summer can also be dehydrating, especially while hiking on fully exposed trails over granite rocks that reflect the intense high-altitude sunshine. You can become dehydrated faster than you might think, especially if mountain breezes are keeping your skin cool. Always drink plenty of water when you're doing outdoor activities and avoid alcohol.
Pay attention to the warning signs of dehydration and heat exhaustion, which can include thirst, dizziness, fatigue, nausea, headaches, muscle cramps, an increased pulse rate, and rapid, shallow breathing. If you experience these symptoms, the most important thing to do is to get out of the sun and into the shade immediately. Drink more water (and if you have any extra, pour some over your head and soak any cotton clothing you're wearing). Your companions should vigorously fan you until you've completely cooled off. It's best to go rest indoors afterward.
Heatstroke is a more serious, life-threatening condition that occurs when your body no longer can regulate its internal temperature. One big warning sign is when you suddenly stop sweating much, if at all. Other symptoms of heatstroke include flushed, red skin that's hot to the touch; a lack of coordination; severe headaches; and altered mental status (e.g., confusion). You should seek medical help immediately.