When the body encounters a pathogen for the first time, it triggers an immune response by generating antibodies. This-response is of low intensity. Subsequent encounter with same pathogen elicits a highly intensified secondary response.
This is ascribed to the fact that our body appears to have memory of the first encounter. This type of secondary immune response is elicited by memory T-cells, B-cell which keep ready to mount a rapid and vigorous attack as soon as the same pathagen infects the body again.