Groundwater dissolved silica (silicon dioxide) from the ash and carried it into the logs, where it formed quartz crystals that gradually replaced the organic matter. Traces of iron oxide and other substances combined with the silica to create varied colors in the petrified wood.