The law of segregation states that during the formation of gametes, the two alleles for a gene separate from each other so that each gamete carries only one allele for each gene. This principle is fundamental to understanding inheritance patterns, as it explains how offspring inherit one allele from each parent, leading to genetic diversity.