According to the latest edition of “Biology” by Campbell:
“Although sex has traditionally been described as binary - male or female - we are coming to understand that this classification may be too simplistic. [...] A person who inherits two X chromosomes, one from each parent, usually develops anatomy we associate with the "female" sex, while "male" properties are associated with the inheritance of one X chromosome and one Y chromosome. [...] The biochemical, physiological, and anatomical features associated with "males" and "females" are turning out to be more complicated than previously thought, with many genes involved in their development. Because of the complexity of this process, many variations exist: Some individuals vary in the number of sex chromosomes in their cells, and others are born with intermediate sexual (intersex) characteristics, or with anatomical features that do not match an individual's sense of their own gender (transgender individuals). Sex determination is an active area of research that will likely yield a more sophisticated understanding in years to come.”