Human body cells have 23 pairs of chromosomes. One pair are the sex chromosomes, which decide whether a person develops as female or male. Females have two X chromosomes (XX). Males have one X chromosome and one Y chromosome (XY).
Gametes carry one chromosome from each pair. Every egg made by a female has an X chromosome. A male makes sperm of two kinds: half carry an X chromosome and half carry a Y chromosome.
A Punnett square for the cross XX x XY has the mother's X and X down the side, and the father's X and Y across the top. The four boxes give XX, XY, XX and XY. Half the children are girls (XX) and half are boys (XY), so the ratio is 1:1 and the probability of each is 50%.
It is the sperm that decides the sex of the child. If an X sperm fertilises the egg, the baby is a girl. If a Y sperm fertilises the egg, the baby is a boy.