Primary immunodeficiencies are caused by genetic defects that impair the immune system's ability to fight infections. They can be classified as humoral, affecting antibody production; cellular, affecting T cells and cell-mediated immunity; or combined. Common primary immunodeficiencies include X-linked agammaglobulinemia, isolated IgA deficiency, common variable immunodeficiency, hyper IgM syndrome, and severe combined immunodeficiency. Secondary immunodeficiencies are acquired, having underlying causes like infections, malnutrition, aging, or drugs. Acquired immunodeficiency syndrome (AIDS) is caused by the human immunodeficiency virus (HIV).