Alleles are different versions of a gene that determine specific traits in an organism. For example, the gene for flower color in pea plants can have a purple allele or a white allele. Each individual inherits two alleles for each gene, one from each parent, which can be the same or different.
When alleles are different, one may be dominant while the other is recessive. The dominant allele will express its trait, while the recessive allele will only show its trait if both alleles are recessive. This interaction helps explain the inheritance patterns observed in Mendelian genetics.