Diagenesis: the physical, chemical or biological processes that turn sediment into sedimentary rock by modifying the mineralogy and/or texture.
Diagenesis occurs where the mineralogy of the rock becomes unstable as a result of changes in the conditions or chemistry. Instability usually occurs at grain contacts and in pore space between the grains. Changes in pressure and temperature cause new minerals to form or preexisting minerals to become modified as the sediment (or rock) adjusts to new equilibrium conditions.