The traits are inherited through genes. Genes code for proteins which decide all the traits like eye colour, height etc. Genes are a basic unit of heredity and are located on the chromosomes. During gamete formation, the chromosomes carrying genes segregate resulting in the inheritance of traits.