Xylem conducts water and minerals from roots to stems and leaves, while phloem transports food from leaves to other parts of the plant.