The sex of the baby is present in thread like structures called chromosomes.human beings contains 23 pairs of chromosomes.A female has 2 X   
chromosomes and male has one X and Y chromosomes.the unfertilized egg has already one X chromosome.if the spream contains X chromosome enters into the egg cell then the baby will be female.if Y chromosome enters then the baby will be male. 
There are 23 pairs of chromosomes in a human body. Two of them are called sex chromosomes. The female body contains 2 x chromosomes, and the male body contains 1 x and 1 y chromosomes.
The female egg contains 1 x chromosome. When the sperm containing x chromosome fertilizes with the egg, the baby will be female. If the sperm containing y chromosome fertilizes with the egg, then the baby will be male. 
This is how sex determination in humans can be represented.