An intrusion is magma (melted rock) which cools and becomes solid under the Earth's surface. It occurs when there are lines of weakness such as faults, joints, or bedding planes in the crust. Then magma enters these lines of weakness. By contrast, an extrusion is magma which cools into rock above the surface of the crust. Both intrusive and extrusive rocks are classed as igneous rocks.