https://en.wikipedia.org/wiki/Carbonate%E2%80%93silicate_cycle
... describes the long-term transformation of silicate rocks to carbonate rocks by weathering and sedimentation, and the transformation of carbonate rocks back into silicate rocks by metamorphism and volcanism. Carbon dioxide is removed from the atmosphere during burial of weathered minerals and returned to the atmosphere through volcanism.
On million-year time scales, the carbonate-silicate cycle is a key factor in controlling Earth's climate because it regulates carbon dioxide levels and therefore global temperature.