Why does our immune system save information about an infectious virus?
When an infectious pathogen enters a person's body, the body launches a defense against the virus, during which the immune system is actually fighting the virus. All the necessary information about the virus is also saved. This specific action in the body is called primary response. Thus, the next time the virus attacks the immune system, it is pre-equipped to deal with the attack and hence, inactivates the virus even before an infection is established. This is called secondary response.