Sex of the unborn individuals is determined in different ways in different kinds of organisms. In some diploid organisms, specific chromosomes have a role in sex determination. Such chromosomes are called sex chromosomes and the rest of the chromosomes of a set are called autosomes.
If sex chromosomes are morphologically similar (i.e. XX) in an individual, the individual is termed homogametic. Such individuals, produce only one kind of gametes (containing X). For example, all eggs of the human female contain an X chromosome and autosomes. So human female is termed as homogametic.
Sex chromosomes in males are morphologically dissimilar (i.e. XY). Such individuals produce two types of gametes (one containing X and the other containing Y) and are called heterogametic. For example, human male produces two kinds of sperms, X bearing and Y bearing sperms.
When the human egg is fertilised by an X bearing sperm a girl is born, and if human egg is fertilized by a sperm having Y chromosome, a boy is born. Whether the unborn will be a male or female is purely a matter of chance and no parent can be blamed for the sex of the progeny.