A pure tall pea plant and a pure dwarf pea plant were crossed by Mendel. Every plant produced from the F1 generation was tall. Mendel obtained both tall and dwarf plants in the ratio of 3:1 in the F2 generation when he selfed plants from the F1 generation.
As an example, consider the following:
This explains why there are two alleles for each set of contrasting characteristics. The dominant trait that is expressed in F1 is controlled by the dominant allele, whereas the recessive trait that is not exhibited in F1 is controlled by the recessive gene. Recessive traits reemerge in the F2 generation when the recessive alleles combine because when the two contrasting alleles are present together in F1 individuals, there is no mixing of alleles and they segregate once more at the time of gamete formation.