Olga:
"Male" and "female" in biology refer back to the gametes produced by sexually-reproducing species. Typically, there are larger and smaller gametes. The individuals of the species with the larger gametes are conventionally referred to as "female", while the individuals with the smaller gametes are referred to as "male".
In the plant world, as I understand it, things are a bit complicated. A single plant can produce both large and small gametes. Therefore, it doesn't make a lot of sense to say that the plant is either female or male.
A lot of species reproduce asexually. Some species undergo transitions from producing large gametes to small ones or vice versa during their life cycles.
Human beings are descended from earlier apes, which are mammals. Amongst the mammals, typically individual animals produce either large gametes or small ones, exclusively.
It doesn't make much sense to ask "which appeared first - males or females?" In sexually-reproducing species, males and females came into existence simultaneously.
Think about this, for instance: suppose there was some species that only had females, but the females were unable to reproduce without receiving male gametes from another member of the species. What would happen, in that case? Clearly, the females would all fail to reproduce and the species would die out. The same argument applies to a theoretical males-only species that required sexual reproduction.
Clearly, the only way for sexually-reproducing species to exist is if females and males developed simultaneously.
You might also ask the question: why are there only two sexes, and not three or seven? I would guess that's due to natural selection. Suppose a species evolved that had three sexes, such that all acts of reproduction required three individuals to come together to mix the three types of gametes. That would be less likely to occur than species with two types of gametes to reproduce. Therefore, it would lead to a situation where the two-sex species vastly overproduced offspring, in comparison to the three-sex species. The most likely outcome is that any three-sex species would go extinct.