Dear student,
Traits are controlled by genes. The genes that controlling the same type of character like body color are known as alleles. As one gets one copy of each gene from either parent, there could be two different alleles of the same gene. The expression of any gene is done through protein synthesis. Here, some proteins are dominant which win out over their fellow proteins like if one allele makes a broken protein, the working protein will be functional and broken protein will not work. In case, if there is no dominant protein, the broken protein produced by the recessive allele will be able to express its character.
Therefore, some traits are recessive and some are dominant.
Regards