Through permineralization, the precipitates that were in the ground water flowed through the tree trunks, replacing the original matter with siliceous minerals, replacing the organic matter with silica.