Venice is literally a man-made city.
Venetian for “fish,” the city started out as a settlement built on top of a sandbar in the middle of the lagoon. Although the idea of building your house on little islands in the middle of the sea is a non-starter for many, the venetians had the will. And admirably, they found their way.
To first construct a house a foundation was needed. Wooden piles were hand-pounded down through sand, silt, and mud. Although using wood for building in the middle of the sea may seem like a bad idea (they can rot), the unique conditions made it possible. As the mud layer was airtight, there was no oxygen. On top of the wood laid a sheet of impermeable marble, preventing (most likely impure) water to seep down. This means the wooden piles were safe from being digested by little organisms. The mud also had lots of mineral sediments. As a ressult not only did the wood not rot, they would eventually petrify into rock-like collumns.
However, there were some underground spaces reserved for freshwater. A system of cisterns running underneath the city would supply non-salty water for the residents.
First, water-proof clay would be used to create the walls for the reservoir. On top of the collector space for water sits a layer of fine sand. This acts as a filter for any liquid that would seep through before getting to the reservoir. On top of the sand would be things like the pavements or the plaza, with their ground bricks laid out so that water can permeate under. Thus as liquids seeps down the reservoir, the resulting freshwater can easily be accessed through a wellshaft running down.