There are different process which helps determine heredity and genetic variations. In this, meiosis makes sure that the offspring will inherit the right count of the chromosomes from each parent.
Hereditary: metaphase 1, anaphase 1, metaphase 2
Genetic variation: crossing over, anaphase 2
Both: DNA Replication, Fertilization