Summary:
Petrified fossils result from permineralization, the replacement of once-living matter by minerals. Solutions containing silicates, carbonates, iron or other minerals seep into the gaps and spaces between the cells, first encasing the cells and eventually replacing the cells themselves. Over time, minerals entirely replace the organic material, creating a petrified fossil.
1. Turning to Stone
Petrifying begins with the quick burial of plant or animal material. Burial slows the decomposition rate enough to allow the replacement to happen. Water containing dissolved minerals circulates through the sediments. Over time, these mineral-rich solutions seep into and saturate the buried remains. As the water evaporates, the minerals remain. The dissolved minerals in the solution crystallize between the cells of the organism. As the cells slowly decay, the solution fills in the gaps left behind. Eventually the deposited minerals replace all of the organic material. Shells, bones and plants, especially trees, are particularly suited to permineralization because the natural structures of the cells maintain their shape during burial and the replacement process.
2. Minerals Copy Life
Most petrified fossils form from silicates, carbonates or iron. The type of material deposited determines the level of detail in the resulting fossil. When silica solutions fill in the cell structure, extremely fine-grained cryptocrystalline quartz forms. The microscopic quartz crystals replace the cell material bit by bit, often creating a duplicate in stone of the original organism, even in some cases down to detailed replication of the internal structure of cells. Carbonate solutions also deposit as very fine-grained crystals that mimic the original cell structures of the organism. The crystals from iron solutions tend to grow larger, showing the major structures of the organism but not the finer details.
3. Mineralogy of Fossils
Environmental conditions determine the type of mineral that petrifies fossils. Silica-enriched water develops in areas with igneous rocks like granites, basalts and especially volcanic ash. Carbonate solutions can develop in marine and non-marine environments, but they most commonly occur in marine environments because calcium carbonate forms more easily in marine environments. Iron-rich solutions require sulfur to form fossils, so iron-petrified fossils most commonly occur in marine environments, with some rarer examples found in clay.
4. Petrified Life
The best known petrified fossils may be petrified forests. Many of these fossils retain so much of the appearance of the trees that the original species and growth habits can be identified. Trees, however, are not the only petrified life. Examples of siliceous fossils include deep-sea marine fossils made of opal, an amorphous silica, and terrestrial fossils, especially plant fossils, made of chert, jasper and other siliceous minerals. Whale bones petrified by calcite, sand dollars petrified by iron pyrite crystals, dinosaur eggs and even ancient dung preserved as stone have been found around the world.
Reference: https://sciencing.com/rock-likely-contain-fossils-8117908.html