In plants, there are two systems of reproduction. Each is called one generation. There is a rotation between these generations. So, one complete life cycle of a plant includes two generations that alternate with each other. Hence the whole mechanism is called alternation of generations.
The two generations or life cycles that occur are called the sporophyte generation and the gametophyte generation. When you speak in genetic terms, it is the rotation in between the haploid and diploid stages. This refers to the chromosomes within the plant cells.
A diploid cell has two sets of chromosomes (one each from the male parent and female parent). A haploid cell has only one set of chromosomes. The haploid generation gives birth to plants with diploid cells. This then creates a generation of haploid plants, which again give rise to a generation of diploid plants. And thus the life cycle of a plant will go on.
The whole life cycle of plants is very complex. But the greatest benefit it gives is the greater genetic control. And how does this happen? In the haploid stage, bad genes can be removed and the diploid stage allows for greater genetic diversity.