
Traits are coded in the form of genes, which eventually codes for specific polypeptide chains. These genes thus gets translated and forms particular proteins expressed in our body, which represents a particular trait.
For example, the trait for skin color is coded by the gene which translates to form the protein melanin, whose function is to produce the skin pigment.