DNA is the chemical of heredity and is found in the chromosomes of our cells. The instructions of the DNA are used to synthesize various proteins needed by the body to function optimally. Distinct segments of DNA are known as genes. Genes are inherited by offspring from their parents. In sexually reproducing organisms, fifty percent of the genes come from the mother and fifty percent from the father. Meiotic cell division produces haploid gametes or sex cells, with half the chromosomes the organism will need. At fertilization, the two haploid sex cells form a diploid zygote(fertilized egg). It is at that moment, that all of the organism's genes are established that they will have in their body. From that fertilized egg, mitotic divisions take place until a mature offspring is formed. All the cells of the body have the chromosome complement that was present in that first fertilized egg cell. In asexually reproducing organisms, whatever chromosomes the parent cell has are passed down to the offspring due to mitosis.
Most traits of any organism are genetic, that is they are present in the DNA codes that make up the organism's genes. Genes are passed down from parent to offspring in all living things. A bacterium that has a gene that protects it from pencillin will inevitably leave that gene to the two daughter bacteria when it undergoes mitosis passing that trait (pencillin resistance) to its offspring. The same happens in sexually reproducing animals. You've probably heard relatives say over a baby, "she has her mother's eyes." They usually mean that the baby has the same eye color as her mother. The mother has brown eyes, and carries the genetic code for brown eyes. Her egg (which became the baby) received the code for brown eyes during meiosis and didn't have a "blue eyes" counter from dad's sperm, so the trait of brown eyes was passed down to the baby.