Rock can be subject to several different kinds of stress:
lithostatic stress: Rock beneath the Earth's surface experiences equal pressure exerted on it from all directions because of the weight of the overlying rock. It is like the hydrostatic stress (water pressure) that a person feels pressing all around their body when diving down deep in water.
differential (deviatoric) stress: In many cases, rock may experience an additional, unequal stress due to tectonic forces. There are three basic kinds.
tensional stress (stretching)
compressional stress (squeezing)
shearing stress (side to side shearing)
Rock responds to stress differently depending on the pressure and temperature (depth in Earth) and mineralogic composition of the rock.
elastic deformation: For small differential stresses, less than the yield strength, rock deforms like a spring. It changes shape by a very small amount in response to the stress, but the deformation is not permanent. If the stress could be reversed the rock would return to its original shape.
brittle deformation: Near the Earth's surface rock behaves in its familiar brittle fashion. If a differential stress is applied that is greater than the rock's yield strength, the rock fractures. It breaks. Note: the part of the rock that didn't break springs back to its original shape. This elastic rebound is what causes earthquakes.
ductile deformation: Deeper than 10-20 km the enormous lithostatic stress makes it nearly impossible to produce a fracture (crack - with space between masses of rock) but the high temperature makes rock softer, less brittle, more malleable. Rock undergoes plastic deformation when a differential stress is applied that is stronger than its yield strength. It flows. This occurs in the lower continental crust and in the mantle