What makes the water system work?

What makes the water system work?

What makes the water system work continuesly? How dose the water get to the top of the palace?

Question about Alhambra