Every organism is made from cells. Cells contain thread like structure known as chromosomes. In humans, there are 46 chromosomes in each cell. And these chromosomes are found in pairs. So there are 23 pairs.
In male and female, all the pairs of chromosomes are same except one pair. Chromosomes in this pair are called sex chromosomes. Sex chromosomes can be of 2 types namely X and Y. In a male cell, both x and y chromosomes are present but in female cell 2 x chromosomes are present.
We know that male reproductive cells are known as sperm and female reproductive cells are known as eggs. reproductive cells are different from normal cells as they contain only 23 chromosomes. One from each pair.
When sperm cell and egg are combined together, they form a cell which has 46 chromosomes or 23 pairs. This new cell formed is called zygote and develops into baby.
Since reproductive cells have only 23 chromosomes, sperm cell can contain either x or y chromosome. And a egg cell will always have x chromosome. During reproduction, lot of sperm cells are released and only one sperm fertilises the egg.
when sperm containing Y chromosome fertilises the egg, resultant cell will have a sex chromosome containing x and y chromosome and the zygote will grow into a boy.
But when the sperm cell containing x chromosome fertilises the egg, resultant cell will have a pair of x chromosomes and the zygote will grow into a girl.
It is clear that a child will be a boy or girl , depends on male and not the female.