The sheer number of ways sex can be determined amongst vertebrates is amazing, let alone other animals or microbes (there are fungi with 10,000 'sexes'/mating types...). I will restrict my examples to vertebrates.
As a rule, in most vertebrates (including humans and other organisms in which it is genetically determined) everything needed to make all the biology of both sexes is present in every individual, but a switch needs to be thrown to pick which processes to initiate.
Many reptiles use temperature during a critical developmental period with no sex chromosomes. Many fish too.
The x y system has evolved independently several times, when an allele of a gene or a new gene appears that when it is present reliably leads to maleness regardless of what else is in the genome. For weird population genetic reasons this nucleates an expanding island of DNA that cannot recombine with the homologous chromosome and which is free to degenerate except for sex determining factors and a few male gamete specific genes that migrate there over evolutionary time, until eventually the entire chromosome degenerates and you get a sex chromosome.
The zw system has evolved multiple times, in which the factor present in one sex and leading to a degenerate sex chromosome leads to femaleness.
In species that are hermaphroditic like some fish all this is superfluous.
In many organisms where sex determination is random or temperature based there are still genetic loci that bias the choice of program one way or another, see my recent comment about zebrafish. These traits are kept in balance in the population because the more males there are the less likely any one of them is to successfully reproduce and vice versa.
Biological sex is ancient but the method of picking which program (or both) to follow has changed frequently.
To echo Salemicus, everyone with a normal endocrine system has testosterone/androgens and estrogens (and other sex hormones too) and indeed both are needed for normal puberty in both sexes, but the ratios and absolute levels vary a lot between the two usual patterns. For example, sealing growth plates in bones to establish adult height requires estrogen for males and females, and androgens are required to establish a lot of hair and skin changes.
One interesting thing I have heard is that amongst hyenas females have more androgens, and this is also visible in size, behavior etc. Must be an interesting kind of puberty.
If it's worth saying, but not worth its own post (even in Discussion), then it goes here.
Notes for future OT posters:
1. Please add the 'open_thread' tag.
2. Check if there is an active Open Thread before posting a new one. (Immediately before; refresh the list-of-threads page before posting.)
3. Open Threads should be posted in Discussion, and not Main.
4. Open Threads should start on Monday, and end on Sunday.