During the formation of gametes (eggs and sperm in people and pigeons), chromosomes go through a process called homologous recombination.
First, the cell makes an identical copy of each chromosome. Identical copies are called sister chromatids, and they remain attached to one another for now.
Next, all four copies—two identical copies of two homologous chromosome—line up next to one another, and they swap large sections of DNA. The DNA strands actually break and rejoin. After recombination, the chromosomes still have the same genes arranged in the same order, but the alleles have been rearranged.
Finally, the chromosomes are divvied up so that each gamete gets just one copy of each chromosome. While each gamete ends up with one copy of every gene, they have different combinations of alleles for those genes.
Recombination increases genetic diversity. The location of the chromosome break points is random (or nearly so), and each gamete receives a random copy of each recombined chromosome. All of this jumbling and mixing allows for a nearly infinite number of allele combinations.
Recombination rearranges chromosomes, generating new allele combinations. While just one homologous chromosome pair is shown above, the same process happens for all of them.