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.