Recessive alleles like the O blood type are preserved when paired with a dominant allele. So parents that are AO or BO can have children that are OO. The recessive allele's effects are suppressed, but it doesn't disappear. It keeps popping back up in future generations. That was one of Mendel's key discoveries.
The frequency of alleles circulating in a population is affected by drift and selection. Assuming no or very weak selection against type O, it's a matter of chance each generation if there are fewer or more children with type O alleles. The O allele could drift to 100% (also called being fixed) or to 0% by chance. This takes a very long time when the effective population is large but is faster for small, isolated populations. There are some variant alleles that are circulating in humans which have been there since before our split with chimps and gorillas.
The largely mathematical field that studies this is called population genetics.
gaiussabinus@lemmy.world 9 months ago
It is possible, but genetics is far more complicated than this. There are also the epigenetic factors for gene expression that is a field of ongoing research. Nothing is ever actually as simple as the example but it is a good example for illustration of the concept.