To understand how, you need to take a closer look at your own DNA. You have 46 chromosomes that contain all your genes. Each chromosome is paired, so there are 23 sets or pairs of chromosomes. One set of 23 chromosomes are given to you by your father and the other set by your mother. Each cell in your body contain all 23 pairs.

In the normal life of the cell, the DNA is unwound in a long chain of spaghetti so that the cell can use it to create proteins that enable the body to function properly. You can think of genes as instructions to the cells for how to build proteins. Slight alterations in genes cause slight alterations to the proteins they create. For example, there are several genes that instruct the cells in your scalp to create proteins that become the hair on your head. Alterations to those genes will alter color, texture and shape of your hair. They can also cause disposition to baldness. Each of your cells contains two copies of every gene, one from your mom and one from your dad. When the genes are different from each other the cell has two options. It can follow the instructions given by a dominant gene or it can blend the instructions given by the both genes much as a cook improvises using two recipes to make a new dish.

When sperm cells are created, DNA is taken through two steps. First the two pairs of chromosomes are brought together, chopped up and reassembled causing some of the chromosomes to have a mixed set of genes coming from both parents. Then, the pairs are divided so that one of the chromosomes goes into one sperm cell and the other goes into a second sperm. The resulting sperm will end up with some genes that are entirely from your mother, some from your father, and some that are a blend of the two. The last chromosome is known as the sex chromosome and contains an X from your mom and a Y from your dad. When the pairs split during the formation of sperm, the X goes into one sperm and the Y goes into another. The means that half of the sperm are female and half are male.