Meiosis is the process by which sexual cells divide their genetic material into new cells. It is different from mitosis in that four new cells are produced as opposed to two. In addition, the diploid parent cell with 23 pairs of chromosomes produces four haploid daughter cells that each contain 23 single chromosomes. Unlike mitosis which produces genetically identical cells, meiosis produces genetically unique cells and allows for genetic diversity and variability. This happens in two different ways; one is an internal part of the process and the other is an end result of the process.
The main way that meiosis produces genetic variability is through a process called chromosomal crossover. This occurs during prophase I, the longest phase of meiosis. The replicated chromosomes will switch adjacent genes after replication to produce a recombined chromosome that contains a mix of genes between the mother's and father's chromosomes. These recombined chromosomes then separate during meiosis I and II to produce four genetically unique cells.
The other way that meiosis contributes to genetic diversity is a result of producing haploid cells called gametes. Different haploid gametes combine during sexual reproduction to produce a diploid zygote. This new diploid cell is a mixture with half of the chromosomes originating from the mother and the other half originating from the father. So offspring are genetically different from their parents.