Changes in an organism's response to a pathogen when that organism has been previously affected by the same pathogen.