The ferns are an ancient lineage of vascular plants, dating back to at least the Devonian. They include three living groups: Marattiales, Ophioglossales, and leptosporangiate ferns. There are also two early groups now extinct: Stauropteridales (known from the Upper Devonian and Carboniferous) and Zygopteridales (the oldest group of fossil ferns). An additional group, the Psilotales, is now tentatively included in the ferns. Though the group is so vastly different in appearance from living ferns, genetic and developmental evidence is accumulating in favor of its classification with the ferns.
Major groups within the ferns are classified based on the structure and location of their sporangia. Most modern ferns produce their sporangia on the underside of their leaves, but most early ferns (and some living groups) produced them along their stems or on specialized stalks that do not look much like leaves at all.
The ferns are now considered close relatives of the horsetails, a small and bizarre-looking group of plants. Both are believed to have evolved from a group of Devonian plants that includes the Cladoxylopsida.
For more information on fern relationships, visit the Filicopsida page on the Tree of Life.