Volcanic ash covered some of the trees while they were still alive, and over time, their trunks turned to stone.
The tree trunks were petrified in volcanic ash over the course of many years.