Carbon cycle
The main way carbon gets taken out of the atmosphere is by photosynthesis by living organisms.  Some of this gets released as they die and decompose, but a proportion gets buried in sediment.  This is shown in the diagram. Sediment turns to rock, and it is the carbonate rocks like limestone which contain the now-solid CO2.  Some of the carbon from plants also becomes part of the soil, where it can stay for a long time before decomposing.