They were carved out by huge rivers that once flowed across the Martian landscape. Now, the rivers are gone. Any remaining water is frozen. The atmosphere is so thin and the temperatures so cold that water cannot exist as a liquid. It quickly evaporates.
Water is locked in the polar ice caps and in a layer of permafrost beneath the Martian surface.
Moisture is locked in the soil itself. If you scoop up a handful of the rocky soil, you can see tiny droplets of water quickly evaporating in the thin air. Snow covers the polar ice caps, but it is not water. This snow is made from frozen carbon dioxide. These blankets of dry ice cover the frozen water locked in the polar caps.