Xylem and phloem are both plant vascular tissues within vascular plants (seed-bearing plants that include the gymnosperms, angiosperms, ferns, and horsetails). They can be related to the veins and arteries of an animal because they transport materials throughout the plant. Such a system is imperative to have in large plants that must carry materials back and forth between the roots and the leaves of the tree.
The difference between the two is the direction and substances that each carries. Xylem moves mostly upwards. It carries the nutrients and water absorbed by the roots in the ground to the leaves. Xylem has a secondary function of support. Xylem is what makes up the rings of a tree trunk that can be seen when it is cut.
Phloem, on the other hand, carries the glucose that is made in the leaves during photosynthesis down to the roots.
Although xylem and phloem perform very different jobs, they are both vascular tissues. A vascular tissue is capable of transporting material through a plant's body. (The evolution of these special transport tissues allowed plants to live from the water to the land.)
The two main types of vascular tissues are xylem and phloem. Xylem carries water up the plant's body. This movement of water happens quickly because xylem vessels are dead at functional maturity. These hollow cells stack on each other like a series of straws. The water, absorbed by the roots, moves UP the "straw" bus cohesion and adhesion. This movements is driven by transpiration on the leaves.
Phloem carries "food," the sugar made in photosynthesis. This movement is slower since it moves through the cytoplasm of living cells. There sugar moves in any direction needed...from "source to sink," where there is a lot of sugar to where there is little sugar.