From what I gathered, these giant trees were felled in a flood. They were buried in water and silt. Eventually different minerals replaced the organic material of the trees turning them into stone. The different colors come from different minerals.
I was disappointed in the selection of souvenirs from this place. I would call them "tacky". If I'm calling them that, then it's pretty bad. I have a problem with the fact that petrified wood was for sale in the gift shop. It's not clear if the proceeds from that shop went to the Park or not (which I also disliked). Regardless of where the money ended up, I didn't like the thought that those for sale were removed from the Park (I don't know if that's the case or not).
Anyway, another pretty picture! As one drives from the southern entrance northward into the Painted Desert, one rounds a bend and suddenly all of the peaks are red. I was absolutely in awe, so much so that I actually verbalized a "Wow!" to my otherwise empty rental car. If the Grand Canyon weren't also nearby, I'd be headed back to this National Park for more...but the Canyon is, so I must also visit that.