An aquifer is an underground layer of water-bearing permeable rock, or permeable mixtures of unconsolidated materials (gravel, sand, silt, or clay) (see also groundwater). Some productive aquifers are in fractured rock (carbonate rock, basalt, or sandstone).
The upper boundary of the shallowest aquifer, if open to atmospheric pressure, is known as the water table. Some areas have several aquifers at different depths, each capped on the top and bottom by low-permeability layers (confined aquifers bounded by confining layers). Where the recharge area of an aquifer has a higher elevation than the top of the confined aquifer, groundwater in the confined aquifer may be under considerable pressure, and the potentiometric head of the confined aquifer will be at a higher elevation than the top of the aquifer. In some cases, where the potentiometric head of a confined aquifer is above the ground surface, flowing or artesian wells may exist. Most land areas on Earth have some form of aquifer underlying them, sometimes at significant depths. Aquifers do not necessarily contain fresh water. Fresh water aquifers, especially those with limited recharge by meteoric water, can be over-exploited and, depending on the local hydrogeology, may draw in non_potable water or saltwater (saltwater intrusion) from hydraulically connected aquifers or surface water bodies. This can be a serious problem especially in coastal areas and other areas where aquifer pumping is exessive.
Aquifers are critically important in human habitation and agriculture. Deep aquifers in arid areas have long been water sources for irrigation (see Ogallala below). Many villages and even large cities draw their water supply from wells in aquifers.
Some aquifers are riparian aquifers. These are related to rivers, fluvial deposits or unconsolidated deposits along river corridors, and are usually rapidly replenished by infiltration of surface water. Some municipal well fields are specifically designed to take advantage of induced infiltration of surface (usually river) water, leaving them potentially vulnerable to water quality problems in the surface water body (chemical spills, petroleum spills, and bacteriological problems).
Aquifers that provide sustainable fresh groundwater to urban areas and for agricultural irrigation are typically close to the ground surface (within a couple of hundred meters) and are have some recharge by fresh water. This recharge is typically from rivers or meteoric water (precipitation) that percolate into the aquifer through overlying unsaturated materials.
An example of a significant and sustainable carbonate aquifer is the Edwards Aquifer  (http://www.edwardsaquifer.org/) in central Texas. This carbonate aquifer has historically been providing high-quality water for nearly 2 million people and, even today, is completely full because of tremendous recharge from a number of area streams, rivers and lakes. The primary risk to this resource is human development over the recharge areas.
Aquifer depletion is a global problem, and is especially critical in northern Africa. However, new methods of groundwater management such as artificial recharge and injection of surface waters during seasonal wet periods has extended the life of many freshwater aquifers, especially in the United States.
The Ogallala Aquifer of the central United States is one of the world's great aquifers, but is being rapidly depleted, primarily for agriculture use. This huge aquifer, which underlies portions of eight states, contain primarily fossil water from the time of the last glaciation. Annual recharge is estimated to total only about ten percent of annual withdrawals.
In unconsolidated aquifers, groundwater is produced from pore spaces between particles of gravel, sand, and silt. If the aquifer is confined by low-permeability layers, the reduced water pressure in the sand and gravel causes slow drainage of water from the adjoining confining layers. If these confining layers are composed of compressible silt or clay, the loss of water to the aquifer reduces the water pressure in the confining layer, causing it to compress due to the weight of overlying geologic materials. In severe cases, this compression can be observed on the ground surface as subsidence. Unfortunately, subsidence due to groundwater extraction is permanent.