Blood groups A, B , O, AB, have antigens that protect against other antigens.
So, eg. A woman with type A blood carries Type A (A hat) antigens, identifying her cells as her own. She also has Anti B antibodies, which will destroy type B cells found in her body. (AB Blood have both in her body, & ∴ she will not attach the cells.
BUT - O blood have neither, and ∴ will attach everything, as they have Anti-A and Anti-B antibodies.
Now.
Blood also has a Rhesus factor of either +ve or -ve (Positive/negative)
On its own, Rhesus factor doesn't cause any issues.
But in pregnancy, if the mother is -ve for rhesus factor, and the baby is +ve, there may be fetal problems in future pregnancies.
💡 Think of Rh factor as a jacket. +ve wears the jacket, and -ve does not.
If mom is +ve, and dad is -ve, baby could be either. And if mom is +ve, and baby is -ve, then no risks are posed in the pregnancy.
But
if mom is -ve, and baby is +ve, the mother may make antibodies against the baby's blood if it was to mix with its own.
In this scenario, we give an Anti-D (gammaglobulin) shot to stop mom from producing antibodies that attach Rh +ve blood.