Similar to the root of a plant, the stem is also an organ. This organ, however, raises and separates leaves and helps expose the leaves to sunlight. The leaves are attached at places called nodes on the stem (the spaces between the nodes are called internodes). Another advantage of stems is to raise the reproductive structures to help scatter the pollen and fruit. Axillary buds can form lateral shoots but are inhibited by apical buds; this is known as apical dominance. To reverse this inhibition, the end of the shoot needs to be taken off (by an animal eating it, a person clipping it, etc.). This allows more light to reach the shoot so that the axillary bud starts produces lateral shoots. These lateral shoots come with their own apical buds, leaves, and axillary buds. This is why cutting back some plants and hedges will actually make them bushier- more lateral shoots are being produced.
Plant stem can be modified for many functions, such as food storage and asexual reproduction. The onion shown in the picture is an example of a modified bulb stem. Bulbs are mainly composed of enlarged bases of leaves whose function is to store food. All of the layers (excluding the innermost stem) are actually storage leaves.