Full transcript: Grace Ann
It can be a lot more complicated than that, though - this is cut and paste off the Internet but it's all accurate:
"First of all, in a sexual species, you can have females be XX and males be X (insects), you can have females be ZW and males be ZZ (birds), you can have females be females because they developed in a warm environment and males be males because they developed in a cool environment (reptiles), you can have females be females because they lost a penis sword fighting contest (some flatworms), you can have males be males because they were born female, but changed sexes because the only male in their group died (parrotfish and clownfish), you can have males look and act like females because they are trying to get close enough to actual females to mate with them (cuttlefish, bluegills, others), or you can be one of thousands of sexes (slime mold, some mushrooms.) Oh, did you mean humans? Oh ok then. You can be male because you were born female, but you have 5-alphareductase deficiency and so you grew a penis at age 12. You can be female because you have an X and a Y chromosome but you are insensitive to androgens, and so you have a female body. You can be female because you have an X and a Y chromosome but your Y is missing the SRY gene, and so you have a female body. You can be male because you have two X chromosomes, but one of your X's HAS an SRY gene, and so you have a male body. You can be male because you have two X chromosomes- but also a Y. You can be female because you have only one X chromosome at all. And you can be male because you have two X chromosomes, but your heart and brain are male. And vice - effing - versa. Don't use science to justify your bigotry. The world is way too weird for that shit."
About half your genes affect your brain and, indirectly, how you see the world. There's at least 15 different sexes in mammals, even if most look superficially male or female. Gender is even more complex, with some people not particularly identifying with one or another or not thinking about it, others having a very firm gender identity that may or may not correlate with their sex or expectations in their society. Like handedness (which is nearly as complex and fascinating - humans are one of few species to have a consistent 10% ratio of lefties), just because you can't see it doesn't mean gender doesn't exist or that those with it don't know what they're talking about.