Rocks are classified into three types according to how they were formed. Igneous rocks are formed by crystallisation from the molten state; sedimentary rocks are deposited at the Earth's surface from water, air or ice; and metamorphic rocks are rocks of any origin that have been subsequently transformed (metamorphosed) by heat and/or pressure, often several kilometres below the Earth's surface.
Rocks are generally either crystalline, i.e. formed of interlocking mineral crystals, or fragmental, i.e. formed of mineral or rock fragments compacted and cemented together by later mineral growth. Most igneous and metamorphic rocks are crystalline whereas most sedimentary rocks are fragmental. Most metamorphic rocks have a foliation or mineral banding, and this distinguishes them from igneous rocks. The presence of fossils usually indicates a sedimentary rock.
Slowly cooled magmas produce large crystals, whereas rapidly cooled magmas produce small crystals. The grain size of an igneous rock is therefore an indication of cooling rate. Igneous rocks are classified according to grain size and the minerals present.
Metamorphic rocks may be produced around the margins of igneous intrusions (contact metamorphism) or throughout large volumes of rock in mountain building events where continental plates collide (regional metamorphism). Regional metamorphism produces foliated or banded rocks, whose grain size increases with increasing pressure and temperature (depth).
The surface environment in which a given sedimentary rock formed can be deduced from the character of the sedimentary grains and the types of any fossils and sedimentary structures present. For example, a large grain size indicates that the energy of the depositional environment was high. Well-sorted, well-rounded grains indicate deposition from the air (wind transport) whereas water-laid sediments have poorer sorting and less rounded grains.
Exposures of rocks display the relationships between different rock types and the arrangement in space of those rocks. This gives additional information about how the exposed rocks were formed. The subsequent geological history can be deduced by identifying evidence for geological events that have altered earlier rocks (for example, folding will tilt originally horizontal beds, faulting will offset originally continuous beds, and a break in sedimentation will give an unconformity).
Sedimentary, metamorphic and igneous rocks are produced within a continuously operating cycle – the rock cycle – which is the path taken by Earth materials in response to chemical, biological and physical changes acting on rocks. Those parts of the rock cycle that produce new sedimentary rocks involve the weathering and erosion of pre-existing rocks, followed by transport and deposition of eroded mineral grains and rock fragments. Certain other sedimentary rocks are formed by biological processes, such as the accumulation of shells. In both cases these processes occur on the surface of the Earth. Most igneous and metamorphic rocks are produced near lithospheric plate boundaries.
The presence of raised beaches is evidence of geologically recent sea level change. The processes involved are a combination of climatically-influenced growth or melting of ice-caps and uplift of land in response to unloading when ice sheets are removed by melting.