In humans, the sex of an individual is determined by the sex chromosomes inherited from the parents. Males have one X and one Y chromosome (XY), while females have two X chromosomes (XX).
The father can pass on either an X or a Y chromosome, while the mother can only pass on an X chromosome.
If the child inherits an X chromosome from both parents, the result is a female (XX).
If the child inherits an X chromosome from the mother and a Y chromosome from the father, the result is a male (XY).
Thus, the genes inherited from the parents (X and Y chromosomes) determine the sex of the child.