What happens when you mix type A with type B blood (and v.v)
The blood type of people is determined by proteins which are anchored into the surface of the red blood cells. Cells can either express the A, B, A and B or no marker, resulting in the blood groups A, B, AB and 0. People which have a certain blood type (for example A) have antibodies against the other blood type (in this case B). 

This will lead to the attachment of antibodies against the subtype which you don't have (so B for people with A and vice versa) on the transfused blood cells and their lysis. Depending on the amount of blood transfused, this can also lead to a very serious immune reaction. This works like in the figure below (from here):



To avoid this reaction a sample of the blood, which is about to be transfused is mixed with blood from the patient before the transfusion takes place. This looks like this:

For more information look here: 


Acute hemolytic transfusion reaction
Transfusion reaction - hemolytic
Genes and Blood Type
Adverse reactions to transfusion