ABO incompatibility happens due to a pregnant woman's fetus with an ABO blood type not compatible with donating blood to her triggering antibodies to attack it.

Rh incompatibility happens due to a pregnant woman's fetus with an Rh factor not compatible with donating blood to her triggering antibodies to attack it.

In other words:

The genotype can also have an impact. If a man is AO or BO, then an O negative woman can have an O fetus and everything is okay. If the man is AA or BB, then ABO incompatibility can happen. Same thing with a heterozygote rh positive man (+/-), where offspring with an rh negative woman can be rh negative as well. If he is homozygote (+/+), offspring will only be rh positive, so rh incompatibility is possible.