It’s not so much that the alleles separate but more so that only one of the parental alleles is passed on. Let’s look at a monohybrid trait to make this easier to comprehend, and let’s say the trait is eye color. One of the parents has blue eyes, a recessive eye color, meaning both of their alleles for that trait are recessive. However, the other parent has brown eyes, a dominant eye color, meaning this parent could either possess one dominant allele that hides the recessive blue (let’s just limit it to two colors to avoid confusion) or they could have two dominant alleles. When gametes are formed, they consist of a combo of alleles, one maternal and one paternal. Meaning, in the case of the heterozygous dominant parent (or the parent with one dominant and one recessive allele) they could either pass on their dominant allele, giving the child brown eyes, or their recessive allele, giving the child blue eyes because they can only ever inherit the recessive trait from the other parent. The law of segregation essentially says that a parent cannot clone itself and create a child in its exact image but rather that the child would inherit one trait from each parent. This is why the child has two alleles for the trait and the parents both have two alleles for this trait. Hope this helps (: