This is a hike to the Sierra Nevada. In the mid summer it is necessary to go high otherwise it is too hot. This is at about 2600m.
Near the Earth's surface, air gets cooler the higher you climb. As you climb a mountain, you can expect the air temperature to decrease by 6.5 degrees C for every 1000 meters you gain. This is called the standard (average) lapse rate.
Why is temperature lower at higher altitudes?
The basic answer is that the farther away you get from the earth, the thinner the atmosphere gets. The total heat content of a system is directly related to the amount of matter present, so it is cooler at higher elevations.