This is an ancient stepwell, and was the city's water supply in the Thar desert. The water level rose and fell, hence the steps.