Ok so main concepts for understanding blood compatibility (antigen-antibody interactions) and what causes hemolytic transfusion reactions below. Testing info and importance of blood donation + genetic distribution to follow
Our bodies, generally speaking, are pretty good at recognizing self and differentiating that from non-self. When our immune systems detects cells or components made by our body, it shouldn't react. When it detect foreign, potentially harmful substances, our white blood cells can respond in a variety of ways. One type of white blood cell, called B cells, produce antibodies.
Usually, we think of antibodies when we talk about diseases and vaccinations, but there are several types of antibodies which get produced in different kinds of reactions. In all cases, antibodies are proteins that recognize and bind with specific substances, known as antigens. That means each antibody has a target, like a specific protein or sugar, that it matches with like a lock with a key. The process of binding together is called agglutination and sometimes lots of antigen-antibody complexes get clumped together. Agglutination often acts as a signal for other cells to come respond to the threat, although it can sometimes neutralize targets directly.
Note: antigen =/= allergen! Allergens are a type of antigen that cause an allergic response
We can imagine with disease, once the body recognizes a foreign microbe through infection or vaccination, it can produce antibodies that target some part of the virus/bacteria/etc, like a protein structure on the microbe's surface. The antibodies bind to their targets and often work as huge flags to the immune system that there is a foreign material that needs to be destroyed.
Many blood transfusion reactions work in a similar way. Our red blood cells have many antigens, mostly proteins on or in the cell membrane. A, B, and D (the +/-) are examples of antigens, but there are a ton more. Our bodies are familiar with the antigens we produce and can react when exposed to foreign ones. When someone receives blood with antigens they don't make themselves, they may have an immune response as their body recognizes and attacks the foreign cells.
This image shows how agglutination can happen with 2 types of antibodies. They bind to red blood cells and can cause them to stick to each other. "Complement activation" refers to proteins involved in increasing immune system response to destroy and clear cells from the body
These types of antibody-mediated transfusion reactions can be acute and occur minutes to hours after the start of the transfusion, or they can be delayed days or weeks after. The antibodies signal for the immune system to destroy the foreign donor red blood cells, which is called hemolysis. The breakdown of cells can cause mild to severe side effects and complications as the pieces of red blood cells flood the body. It also ruins the intent of the transfusion itself, since the destroyed blood can't help fix the original blood problem.
Note: As a term, "blood transfusion reactions" can refer to a variety of reactions, including immune-mediated (hemolytic, non-hemolytic febrile, allergic reaction, and TRALI) and non-immune (infection, TACO) responses. Blood bank testing is mostly focused on preventing immune-mediated hemolytic reactions
Now, antibodies can be weird. People produce them in different amounts and strengths, they can be affected by age or illness, and our bodies remember how to produce them for different periods of time. Not everyone who is exposed to blood with foreign antigens produces antibodies against it or will have the same response. There are also a lot of different blood antigens; some can cause stronger or longer antibody response.
Many transfusion-related antigens also only cause reactions after repeat exposure. Much like vaccines or allergies, the first exposure primes the immune system, showing it what the foreign substance looks like. Then, the next time that substance appears, the immune system can respond faster and harder than it did before. Most antibodies in transfusions, including the one that targets D (the +/- of your blood type) antigen, work like this.
This means people may be exposed to new blood antigens during a transfusion, transplant, or through pregnancy (including ectopic and aborted pregnancies), and not have a significant response. But during a following exposure, their body then produces lots of antibodies against the antigen it has seen before and causes a reaction. People who receive multiple blood transfusions are at a much higher risk of repeat exposure to antigens they don't make.
The exception to this is ABO mismatching. A and B antibodies are naturally occurring, meaning that our bodies can produce them without having ever been exposed to other blood before. This means that we can have a large antibody response on first exposure to an incorrect type. Different countries and transfusion centers have different testing procedures and requirements, but ABO typing is given priority because of its ability to cause immediate, severe reactions.
Remember, people make antibodies against what they don't already have themselves. Those with type-A blood have A antigens, so they will not make A antibodies, but they can make B antibodies. Type-B blood can make A antibodies, but not B. Type-AB have both antigens, so they don't make antibodies for either.
O is not an antigen. Type-O blood means that there is a lack of A and B antigens. Therefore, these individuals can produce antibodies against A and B. Type-O blood can be used in emergency situations because lacking antigens means there is nothing to stimulate an immune response (unless you're quite unlucky enough to have the Bombay phenotype).