|This article does not cite any references or sources. (December 2009)|
In geology, a vein is a distinct sheetlike body of crystallized minerals within a rock. Veins form when mineral constituents carried by an aqueous solution within the rock mass are deposited through precipitation. The hydraulic flow involved is usually due to hydrothermal circulation.
Veins are classically thought of as being the result of growth of crystals on the walls of planar fractures in rocks, with the crystal growth occurring normal to the walls of the cavity, and the crystal protruding into open space. This certainly is the method for the formation of some veins. However, it is rare in geology for significant open space to remain open in large volumes of rock, especially several kilometers below the surface. Thus, there are two main mechanisms considered likely for the formation of veins: open-space filling and crack-seal growth.
Open space filling 
Open space filling is the hallmark of epithermal vein systems, such as a stockwork, in greisens or in certain skarn environments. For open space filling to take effect, the confining pressure is generally considered to be below 0.5 GPa, or less than 3-5 kilometers. Veins formed in this way may exhibit a colloform, agate-like habit, of sequential selvedges of minerals which radiate out from nucleation points on the vein walls and appear to fill up the available open space. Often evidence of fluid boiling is present. Vugs, cavities and geodes are all examples of open-space filling phenomenon in hydrothermal systems.
Alternatively, hydraulic fracturing may create a breccia which is filled with vein material. Such breccia vein systems may be quite extensive, and can form the shape of tabular dipping sheets, diatremes or laterally extensive mantos controlled by boundaries such as thrust faults, competent sedimentary layers, or cap rocks.
Crack-seal veins 
Crack-seal veins are thought to form quite quickly during deformation by precipitation of minerals within incipient fractures. This happens swiftly by geologic standards, because pressures and deformation mean that large open spaces cannot be maintained; generally the space is in the order of millimetres or micrometres. Veins grow in thickness by reopening of the vein fracture and progressive deposition of minerals on the growth surface.
Tectonic implications 
Veins generally need either hydraulic pressure in excess of hydrostatic pressure (to form hydraulic fractures or hydrofracture breccias) or they need open spaces or fractures, which requires a plane of extension within the rock mass.
In all cases except brecciation, therefore, a vein measures the plane of extension within the rock mass, give or take a sizeable bit of error. Measurement of enough veins will statistically form a plane of principal extension.
In ductilely deforming compressional regimes, this can in turn give information on the stresses active at the time of vein formation. In extensionally deforming regimes, the veins occur roughly normal to the axis of extension.
Mineralisation and veining 
Veins are of prime importance to mineral deposits, because they are the source of mineralisation either in or proximal to the veins. Typical examples include gold lodes, as well as skarn mineralisation. Hydrofracture breccias are classic targets for ore exploration as there is plenty of fluid flow and open space to deposit ore minerals.
Ores related to hydrothermal mineralisation, which are associated with vein material, may be composed of vein material and/or the rock in which the vein is hosted.
Gold-bearing veins 
In many of the gold mines exploited during the gold rushes of the 19th century, vein material alone was typically sought as ore material. In most modern mines, ore material is primarily composed of the veins and some component of the wall rocks which surrounds the veins.
The difference between 19th century and modern mining techniques and the type of ore sought is based on the grade of material being mined and the methods of mining which are used. Historically, hand-mining of gold ores permitted the miners to pick out the lode quartz or reef quartz, allowing the highest-grade portions of the lodes to be worked, without dilution from the unmineralised wall rocks.
Modern mining using larger machinery and equipment forces the miners to take low-grade waste rock in with the ore material, resulting in dilution of the grade.
However, modern mining and assaying allows the delineation of lower-grade bulk tonnage mineralisation, within which the gold is invisible to the naked eye. In these cases, veining is the subordinate host to mineralisation and may only be an indicator of the presence of metasomatism of the wall-rocks which contains the low-grade mineralisation.
For this reason, veins within hydrothermal gold deposits are no longer the exclusive target of mining, and in some cases gold mineralization is restricted entirely to the altered wall rocks within which entirely barren quartz veins are hosted.