Strictly speaking, a tree itself is neither male nor female
Every plant alternates between two generations. The big visible plant, whether oak or daisy, is a sporophyte that makes spores, not sex cells, so technically it has no sex. The true male plant in a flower is a tiny body of two to four cells, sealed inside a single pollen grain.
Plant reproductive morphology studies the shapes and structures involved, directly or indirectly, in sexual reproduction. Flowers are the most physically varied reproductive organs of any living things, with a matching diversity of methods, while mosses, ferns, conifers and algae have their own intricate adaptations. How sperm from one plant reaches another's egg, the breeding system, is the single biggest influence on the genetic makeup of non-clonal plant populations.
The life cycle alternates. A sporophyte produces spores that grow into gametophytes, which make eggs and sperm; these unite and grow into a new sporophyte. Spores may be uniform or split into small microspores and large megaspores, and gametophytes can make both kinds of gamete or only one. In mosses, liverworts and hornworts, the gametophyte is the dominant, visible plant. In ferns and seed plants the sporophyte dominates. Fern and moss gametophytes live independently, but in seed plants the female gametophyte hides inside the sporophyte and depends on it entirely for food. Botanists still call flowers male, female or bisexual as shorthand for the gametophytes they produce.
A typical perfect, or bisexual, flower is arranged in rings. Outer sepals form the calyx and petals the corolla, together the perianth, which plays no sexual role. Inside, stamens, collectively the androecium, make pollen, each grain holding a male gametophyte grown from a microspore. At the centre sit carpels, the gynoecium, whose ovules each contain a female gametophyte. Pollen landing on the stigma grows down through the style into the ovary to reach it.
The science has deep roots. In 1793 Christian Konrad Sprengel first showed that pollination depends on both living agents and physical forces. Charles Darwin drew on that work in building his theory of evolution, including his analysis of how flowers and their insect pollinators evolved together.
Source: Plant reproductive morphology