The branch of biomedicine concerned with the structure and function of the immune system, innate and acquired immunity, the bodily distinction of self from nonself, and laboratory techniques involving the interaction of antigens with specific antibodies.