When homologous chromosomes form pairs during prophase I of meiosis I, crossing-over can occur. Crossing-over is the exchange of genetic material between non-sister chromatids of homologous chromosomes. It results in new combinations of genes on each chromosome.
When cells divide during meiosis, homologous chromosomes are randomly distributed during anaphase I, separating and segregating independently of each other. This is called independent assortment. It results in gametes that have unique combinations of chromosomes.