Both, the tower doesn't have one opening on the bottom - it has two or four and they are separated by walls in the center. Wind is coming in from one direction and pushes cool air down into the building, hot air comes out the other side of the tower.
This article has a good visualization: https://surfiran.com/windcatcher-an-ancient-engineering-feat...