The immune system has evolved to protect the host from a universe of pathogenic microbes that are themselves constantly evolving. The immune system also helps the host eliminate toxic or allergenic substances that enter through mucosal surfaces. Central to the immune system's ability to mobilize a response to an invading pathogen, toxin, or allergen is its ability to distinguish self from nonself. The host uses both innate and adaptive mechanisms to detect and eliminate pathogenic microbes, and both of these mechanisms include self-nonself discrimination. This overview identifies key mechanisms used by the immune system to respond to invading microbes and other exogenous threats and identifies settings in which disturbed immune function exacerbates tissue injury. © 2010 American Academy of Allergy, Asthma & Immunology.