Plants and animals both evolved together, but that doesn't mean trees have been around just as long as animals were.
Plants evolved over hundreds of millions of years, originally descending from green algae. There used to be, and still are, many types of green algae. The ones living on shorelines had to adapt to the more extreme climate, since they would be exposed to more light, heat, and dryness than normal seaweed. These plants evolved into the ones we have growing on land today, including trees.
Early land plants were probably bryophytes, nonvascular mosses and lichens, and later on, ferns. Most of our oil comes from various ferns and related plants that prospered during the Carboniferous period. From these, conifers evolved, and from those, angiosperms (flowering plants) evolved, about 125 million years ago. Many plants coevolved with animals (flowers and bees, for example) or with other life forms such as fungi (lichen).
Here is some information on plant evolution:
Curricular Resourceshttp://www.mansfield.ohio-state.edu/~sabedon/biol3060.htm