Alleles are referred to as the alternative form of a gene found on the homologous chromosomes.
They are present at the same position on a chromosome thereby affecting the same characters but in very different ways. For instance, a gene responsible for height has two alleles i.e. one for being tall and the other for being a dwarf.
Dominant Genes:- Those genes that are capable of expressing the traits carried by them in homozygous as well as in heterozygous conditions are called dominant genes. For example, the height of a pea plant as tall is a dominant trait represented as "TT"/"Tt".
Recessive Genes:- The genes that are unable to express the traits carried by them in heterozygous condition & gets suppressed by the dominant genes are called recessive genes. They can be expressed only in homozygous conditions For instance, a dwarf pea plant is a recessive trait, genotypically represented as "tt".
In the case of codominance, neither allele is dominant or recessive. Both of the alleles are expressed.