The immune system protects the body from pathogens and other harmful foreign substances. There are two types of immunity: innate immunity, which provides immediate defenses, and adaptive immunity, which has immunological memory. Innate immunity relies on physical and chemical barriers as well as phagocytic cells that destroy pathogens. Adaptive immunity develops over time as the body is exposed to pathogens and involves antigen-presenting cells activating B cells and T cells. Together, innate and adaptive immunity provide comprehensive protection against infection.