The immune system defends the body against pathogens through layered lines of defense. The innate immune system provides immediate nonspecific responses while the adaptive immune system mounts targeted responses through lymphocytes. B and T lymphocytes recognize pathogens through antigen receptors and mount humoral or cell-mediated responses involving antibody production or cytotoxic killing. Immune memory develops from these responses to provide faster protection upon reexposure. A balanced immune response is needed, as deficiencies or issues with self-tolerance can lead to infection or autoimmunity.