Gregor Mendel bred pea plants in order to study the traits that were passed along to their offspring, what is known as heredity. He noticed that within the new generation there were traits or genes that hadn’t been there before.
This was due to the fact that a gene is composed of two alleles, one from each parent. The alleles are responsible for which traits show up in the next generation and are represented through letters, either a capitalized letter or lower case letter. A dominant allele being the one to always be expressed in offspring with an upper case letter and the lower case letter being a recessive allele which is only expressed when the dominant allele is absent. In the case of which you have a gene made up of two capital letters (BB) you have homozygous dominant, if its two lower case letters (bb) it’s homozygous recessive and if you have one of each (Bb) then it’s heterozygous gene the dominant allele will still show through however, covering up the recessive trait this is known as Mendel’s Principle of Dominance where the recessive gene will make a reappearance in future generations.
Many of our traits are managed by multiple genes. That's why there are so many different variations in skin color, height, hair color, and so on. The reason it's possible for some of these traits to change over time is because of your epigenome. This allows for traits to be expressed and genetic information to be read easier.
The likelihood of a trait is determined through the amount of times it appears on the squares. Each square represents a 25% chance of the offspring inheriting that phenotype, so if black hair is a dominant trait and one of the parents' genes for this trait is homozygous dominant and the other is heterozygous than there is a 50% chance of the offspring being born with homozygous dominant black hair and 50% heterozygous dominant hair. Although, let it be known that even if the offspring do not display the genotype they can still inherit that trait and be a carrier, it may just reappear in another generation.
However it is possible for offspring to inherit and display both traits rather than just show the dominant trait. There are two different ways multiple phenotypes can be expressed, one being codominance and the other being incomplete dominance. For example, codominance can be represented by a dalmatian; with its black or brown spots standing out against its white coat.