Biologically speaking, the most important difference between the sexes is that females produce eggs that are much larger than the sperm of the male. Large eggs are an advantage because they provide more resources for the developing zygote. But making your eggs large means that you can’t produce so many of them, so another valid evolutionary strategy is to make lots of small, cheap sperm.
Both of these strategies seem to be more effective than the compromise of producing a moderate number of middle-sized gametes, so evolution has gradually driven eggs and sperm in different directions. Once they’ve evolved to have different gametes, the sexes are also driven to evolve other differences. For males to be promiscuous, and females to be choosy, for example.