And for the winter, you just switch to the hole that's bored down to molten lava.
That diagram shows how the old timey Iranians cooled themselves about 1,000 freaking years ago. You see, during the Achaemenid Empire (2,500 years ago), Persians started building complex underground irrigation systems called qanats, whose transported water allowed people to not die during droughts. The qanats were basically a series of giant holes in the ground leading to an underground stream -- you can still see them from satellites these days:
"And lo, the lord did snake-f**k the earth."
Fast forward to the middle ages: After realizing that these areas were unfortunately still hot as deserts (because they were deserts), the Persians also began to construct wind towers above their buildings. Warm air flowed down to the cold water stream under the building and circulated back to the lower level of the house transformed into a cool, refreshing breeze. The wealthiest inhabitants of the region had huge qanat-connected basements for the sole purpose of sitting back and chilling in the middle of the desert heat -- some of these included pools and, we have to assume, naked slaves swinging giant leafs.
As far back as 400 BC, the qanats were also used to refresh specially constructed "refrigerator" rooms where the Persians stored ice accumulated during the winter. We think it's no coincidence that these buildings looked like giant upside-down ice cream cones.