When guppies mate, each parent provides half of the offspring's genes. The mother's and father's chromosomes each split so that there is no longer a pair, only half a pair. One chromosome from the father unites with one chromosome from the mother to form a new chromosome pair. When the genes match up at each locus, a new trait is established. Now, if the genes on both side of a locus are the same as the genes before the chromosome split during mating, then the feature will be identical to the parent. More often than not, this is not the case, so the offspring may have a different feature.
Let's take an example of this. It is known in the real world that a gene exists in guppies for wild coloring (full coloring) and albinism. We can create a chart which will show the results of a mating of these two types.
We can say that the genetic "code" for the full colored guppy is CC and that the genetic "code" for the albino guppy is cc. Remember that genes exist in pairs, one on each chromosome. Thus we get the codes CC and cc. When mating occurs, the gene splits, so the full colord fish (CC) will supply a "C" gene to the offspring. The albino on the other hand, having a code of "cc" can only supply a "c". Thus, we lay out a simple chart to find out the results of this mating:
The two "C" codes accross the top are the possible genes that the full colored guppy can supply. The two "c" codes down the left side are the possible genes that the albino guppy can supply. The four boxes show what the offspring will be. In this case, all the offspring is of the code "Cc".
In the real world we know that the gene for a full color guppy ("C" in our example) is dominant. A dominant gene only has to be present in a single dose for that feature to exert itself. We also know in the real world that the gene for an albino guppy ("c" in our example) is recessive. Recessive genes have to be present on both sides of the locus for that feature to exert itself.
For our example above, this means that an offspring would have to have a genetic code of "cc" in order to be albino. Since all of our offspring have the dominant "C" gene, none will be albino and all will be full color.
Now let's move on to a more interesting (and practical) example. What would happen if we mated two of our offspring from the example above? Each parent has a genetic code of "Cc". What would two "Cc" parents yield? Let's draw out a chart:
Again, one parent provides the genetic codes across the top, and the other provides the codes listed down the left side. Each parent is a "Cc", so the a child could inherit either the "C" or the "c". We don't know which, so the chart shows all possibilities.
Our chart shows that 25% of our offspring will be "CC", 50% of our offspring wil be "Cc" and 25% of our offspring will be "cc". Since the full color gene "C" is dominant and is present in 75% of our offspring (both the CC and Cc offspring) we know that 75% of our offspring will be full colored. The 25% that have the "cc" recessive genes will be albino.