Roots absorb nutrients and water from the soil, as well as keep the plant attached to the ground. Some plants also use the roots, to parasite other plants (ie, Mistletoe) or reproduction (Potatoes).
Stems, transport water and nutried to the plants up reaches, sometimes they are important for protection, as they are covered in thorns or toxins.
Branches sort of form the same function as stems, only they branch out from the stem.
Leaves, are where the plant conducts its metabolic photosynthetic processes. Sometimes the leaves are also important for protection (the thorns of cacti are actually leaves).
Flower, are useful for reporduction, giving out pollen and when combined with other pollen are turned into fruits.
Fruits are the protective object of the seed, and provide nutrition for the seed, a means of seed dispersion, and lastly protection from outside forces.