|Source: Ed Uthman, MD|
The chromosomes a child receives is always an X from the mother, and then randomly an X or Y from the father. Some techniques are used to increase the odds of a particular chromosome from a father, but choosing your baby's sex is not an exact science. Manipulating the environmental conditions of the vagina to make it more hospitable to particular sperm is also not certain. It hinges on the father's random contribution to the baby's genetics.
This genetic makeup then affects the physical aspects of the child's gender through various processes of sex differentiation and determination, ultimately leading to a male or female. Read more about how the gender of a child is determined at conception.