Allele frequencies describe the genetic makeup of a whole population. The Hardy-Weinberg equation shows when those frequencies stay constant, and when they change.
A population has a gene pool: every allele of every gene in every member. For a gene with two alleles, A and a, the allele frequencies are:
p = frequency of A, q = frequency of a, p + q = 1
Each individual carries two alleles, so each allele appears in two copies per diploid individual. Frequencies are always proportions of all gene copies in the population.
p² + 2pq + q² = 1
p² = frequency of AA (homozygous dominant); 2pq = frequency of Aa (heterozygous); q² = frequency of aa (homozygous recessive).
A population is in Hardy-Weinberg equilibrium when its allele frequencies stay the same from one generation to the next. This needs five conditions: no mutation, no migration, no natural selection, a very large population, and random mating.
The ABO blood groups are controlled by three alleles: IA, IB and i. Surveys of different populations show different frequencies of the blood groups, which means the allele frequencies differ between groups. Such differences come from isolation, migration, drift or selection in different environments. Hardy-Weinberg is the baseline: a difference between the observed and expected genotype frequencies is evidence that one of the five conditions is not met.