The cell division that halves the chromosome number and shuffles the genome at the same time. It is the reason sexual reproduction produces variation, and the reason no two siblings are alike.
Fertilisation combines two cells. If each carried a full complement of chromosomes, the number would double every generation, which is impossible.
Meiosis halves it. A cell with two copies of each chromosome produces gametes with one, so fertilisation restores the original number. August Weismann predicted such a division must exist in 1887 on precisely this logical ground, before it was observed.

Meiosis is two divisions following one round of DNA replication, which is what makes the reduction possible.
In the first division, the two members of each chromosome pair find each other, align along their length, and are pulled to opposite poles. This separates the pairs, and it is the reduction step.
In the second division, which resembles ordinary mitosis, the two copies of each chromosome separate. The result is four cells, each with a single set.

The pairing in the first division is the critical and error-prone step. Failure to separate correctly produces gametes with an extra or missing chromosome, which is the cause of trisomy 21 and of most spontaneous miscarriage. The error rate rises sharply with maternal age, because human oocytes begin meiosis before birth and pause in the first division for decades, with the machinery holding the chromosomes deteriorating throughout.
Two mechanisms, and their combined output is enormous.
Independent assortment: which member of each pair goes to which pole is decided independently for every chromosome. With 23 pairs, that alone gives over eight million possible combinations per gamete, and over seventy trillion combinations for a fertilised egg.
Recombination: while paired, homologous chromosomes physically exchange segments. Crossing over breaks and rejoins the DNA, so each chromosome in a gamete is a mosaic of the two the parent inherited.

Recombination is what makes genetic mapping possible. Thomas Hunt Morgan and Alfred Sturtevant recognised in 1911 that genes close together on a chromosome separate less often than genes far apart, and that the frequency of separation is therefore a measure of distance. Sturtevant, an undergraduate, produced the first genetic map that night. The unit of map distance is named the centimorgan after Morgan.
Recombination is not merely useful for geneticists. It is mechanically required: the crossover physically holds the pair together until the moment of separation, and pairs that fail to cross over separate incorrectly.
Sexual reproduction is expensive. It requires finding a mate, it discards half of each parent's genome, and an asexual female passes on twice as many of her genes as a sexual one. This is the twofold cost of sex, and explaining why sex persists despite it is a long-standing problem.
The leading answers involve variation. Recombination allows beneficial mutations arising in different individuals to be combined into one lineage, which an asexual population cannot do. It also allows deleterious mutations to be separated out; without it, an asexual lineage accumulates them irreversibly, a process called Muller's ratchet.
The Red Queen hypothesis proposes that the pressure is parasites. Pathogens adapt to common host genotypes, so rare combinations are favoured, and sexual reproduction generates rare combinations continuously. This has empirical support, including in snail populations where sexual and asexual forms coexist and the sexual form dominates where parasite pressure is highest.
Mendel's laws follow directly from meiosis, which is why they were understood properly only once the division was observed. Segregation is the separation of the pair; independent assortment is the independence of that separation across chromosomes. Genes on the same chromosome violate independent assortment, which is linkage, and recombination is what partially breaks it.
The persistence of meiosis across essentially all eukaryotes, from yeast to trees to humans, using the same core machinery, indicates it arose once, early, and has been retained ever since. Whatever advantage it confers has been sufficient to keep it for well over a billion years.