There are four main blood types - A, B, AB, and O - which are determined by the presence or absence of antigens on red blood cells. The blood type of both the donor and recipient must be compatible to prevent dangerous reactions. Type O blood is the universal donor as it lacks antigens and contains antibodies against A and B antigens. Type AB blood is the universal recipient as it has both A and B antigens and lacks antibodies. The Rh factor must also be considered to ensure transfusion safety.