Meiosis is the type of cell division that makes gametes. It happens only in the reproductive organs, which are the ovaries and testes in humans. A diploid cell copies its DNA and then divides twice, producing four cells. Each has half the chromosome number of the parent cell, so each is haploid. In humans, a cell with 46 chromosomes makes gametes with 23.
Halving the number matters because of fertilisation. If gametes were diploid, the zygote would have double the chromosomes of its parents, and the number would double again in every generation. Because gametes are haploid, fertilisation restores the diploid number, so the chromosome number stays the same from one generation to the next.
Meiosis is also a source of genetic variation. Each gamete receives a random mix of the chromosomes from each pair, some originally from the mother and some from the father. This means the four gametes carry different combinations of alleles and are genetically different from each other. Which sperm fertilises which egg is also down to chance, so offspring differ from their parents and from each other.