The sex of the child is dependent on the combination of x and y chromosomes.
All human beings have 23 pair of chromosome. Out of these two chromosomes are sex chromosome. Female has two X chromosomes while male has X and Y chromosome. Egg and sperm have only one set of chromosome. Egg contains X chromosome whereas sperm can contain X or Y. When the egg gets fertilized with X containing sperm , the zygote will contain XX chromosome so the child will be female, but if egg gets fertilized with sperm containing Y, the zygote will contain XY and the child will be male.