Ferns propagate sexually in an alternate generation. Tiny prothalli (gametophytes) grow from the spores scattered by the normal large ferns (sporophytes). Each gametophyte can produce both male and female gametes, and fertilize itself. That would, however, bypass the whole point of having sexual reproduction, which is to diversify the gene pool so that in hard times at least some genomes would survive to propagate the species. Various mechanisms are used to encourage fertilization of one prothallus by another, including varied timing of gamete production, inhibition of competing ova, and even antherogenisis whereby chemical signals from a prothallus with ova solicits other nearby prothalli to produce only male gametes.
When the ovum has been fertilized, a tiny sporophyte plant grows out of it. The prothallus then withers, and the sporophyte grows into the large fern we expect.
Sexual reproduction, for all its advantages, is slow and complex. When a fern is competing for time and space with other nearby plants (almost always), it may bypass such luxury. In fact, the large majority of ferns you see while walking outdoors have reproduced asexually. Many, like Bracken, Hayscented, Ostrich, or Sensitive, spread rather quickly by means of their underground rhizomes. In fact, it is rare to see Bracken with sori. Bulblet fern has its unique alternative. Some ferns are apogamous, scattering cells like spores which have not undergone meiosis, which nonetheless develop prothalli and sporophytes which grow from them; they are however all clones of the parent. Purple Cliff-brake is a triploid, hence incapable of sexual reproduction since it cannot form equal pairs of chromosomes, yet it manages to propagate apogamously. Some hybrid ferns, e.g. Polypody, are known to propagate by unreduced mother cells, when one would expect them to be sterile taxa.