Ferns have inhabited Earth for hundreds of millions of years. They are nonflowering vascular plants that possess true roots, stems, and complex leaves and reproduce by spores that form inside sporangia.
Sporangia of fern plants are found on the underside of their leaves, and they contain and eventually disperse the reproductive spores of ferns. Spores contain the reproductive material of the fern and can survive unfavorable conditions for extended periods of time. But the tiny spores need to be dispersed from the parent fern so that new fern plants can grow, and the further away the spores are dispersed, the better.
Sporangia grow in clusters called 'sori', and they do the job of propelling the spores that were clinging to the inner surface of the sporangium through an ingenious chain reaction. As the fern plant matures, the sporangia eventually begin to dry and when this happens the spines down the middle contract, and this causes it bend outwards, opening the sporangium through which the spores can escape. The annulus cells of the sporangium continue to lose water from evaporation, causing gas bubbles form inside, which also makes bubbles in the neighboring cells. It's the bubbles that make these cells snap back into their original positions, and this "snapping" effect catapults the tiny spores in all directions through the opening of the sporangium which then lie dormant until conditions are right for new ferns to grow.