Artesian wells form when water flows through a permeable rock from a higher area to the area of the well. Artesian wells produce water flow without any additional pumping because of the water pressure in the rock, so they require a layer of impermeable rock beneath the permeable rock to block the flow downward. Thus, when a well is dug into the permeable rock, the water flows out under pressure.
The permeable rock that carries water for an artesian well is most commonly sandstone. Water soaks into the ground some distance above the well and permeates the rock. When it is trapped by impermeable rock, such as shale or clay, the weight of the water creates pressure. In natural settings, this can emerge from the surface near the bottom of the permeable layer as an artesian spring, but humans can create a flow deliberately by digging a well.
Artesian wells and springs are important sources of water in some environments, particularly arid plains near mountains. These sources of water have long been used by humans, but modern use has greatly depleted many of them. The modern demand for water, particularly for agriculture, can far outstrip the replenishment of artesian well sources.