The offspring could gain its traits from its parents via mitosis or meiosis. Meiosis is the one that creates genetic diversity. Chromosomes from both parents are located in a cell. Chromosomes are coiled up DNA, which has all the genes of the parent in which it came from. The chromosomes gets separated randomly, and then the cell divides. The offspring-cells now has some DNA from the mother, and some DNA from the father.
Now the cells continue their division until a baby is born. The baby is born with certain traits. It's traits are inherited from the mother and the father, so they are inherited traits.