Meiosis is a type of cell division that produces haploid gametes from diploid cells in two stages. In meiosis I, homologous chromosomes pair and undergo crossing over, then separate. This reduces the chromosome number by half to produce haploid cells. Meiosis II then divides the contents of these haploid cells without further combining of homologs, resulting in four haploid gametes. This ensures each gamete has a random set of one of each type of chromosome, allowing for genetic variation in offspring.