The life cycle has two phases - sporophytic and gametophytic which are diploid (2n) and haploid (n) respectively.
The sporophyte undergoes meiosis to form haploid spores (n).
These spores germinate into gametes (gametophyte).
The male and female gametes fuse to form diploid (2n) zygote, which gives rise to sporophyte. This phenomenon is called alternation of generation.
Example.
Ferns
The delicate leaf-like fronds of the mature fern drop spores from sporophyte structures on the undersides of the fronds. The spores that drop to the ground develop into tiny gametes. If conditions are sufficiently moist, these gametes mature and produce sperm and egg. The sperm needs to swim to the egg, so they must be in water.