There are many variations on the life cycles of marine algae and only the main, or most common types are dealt with here.
Within the red algae, a triphasic life history is pretty common. This means there are separate male and female plants. These plants produce gametes which (much like sperm and eggs) have half the genetic code necessary for the species (1n). When these gametes are fertilised, they grow into a carposporophyte, a separate generation (2n), that is often housed within a cystocarp. These spores are eventually released into the water column, settle on a hard surface and germinate, then grow into another generation known as the tetrasporophyte (2n). Sometimes this tetrasporophyte generation looks identical to the male and female gametophytes that originally produced it. This is known as an isomorphic alternation of generations. But sometimes they look completely different and form a thin felt-like crust on the seabed. This is known as a heteromorphic alternation of generations. These tetrasporophytes then produce tetrasporangia (by meiosis resulting in four 1n spores) that are released into the water column and germinate and grow into more male and female gametophytes and thus the cycle is complete.
Within the brown algae, it is common for the larger plants that we see in the shallows or washed up on the beach (the kelps) to be the diploid or 2n generation or sporophyte. This generation produces zoospores (tiny unicellular plants that can swim) that germinate into gameteophytes that are male and female plants that in turn produce gametes. These fertilise each other and grow into large kelps again.