A simplistic overview
The presence of a blood group A and B antigens on the outside of a red cell starts with the presence of a blood group A or B gene and a variety of different glycolipid and glycoprotein blood group H antigen precursors. When the gene is transcribed it results in a glycosyltransferase, which in the endoplasmic reticulum and Golgi is able to transfer in specific alpha 1-3 linkage an activated N-acetyl galactosamine or galactose sugar for blood group A or B, respectively, onto blood group H antigen precursors. The resultant blood group antigen, when present on the surface of a red cell membrane can then react with antibodies. The amount, structure (length and branching) and to some extent the type of antigen, present at the red cell surface, determine its ability to react with specific antibodies. Thus creating serologic variants that can be defined as specific blood group ABO phenotypes. Essentially the dominating factor in determining the phenotypic variants of A and B is genetic variants that result in enzymes which have reduced enzyme activity which affect the level of antigen present at the red cell surface. A detailed review of this process follows.
Lola Svensson, Serge Pérez & Stephen Henry. “Blood Group ABO and its variants” Glycopedia (2017)