Artificial immunity
Artificial immunity is acquired through things like medicine and vaccines. Vaccines inject a dead or weakened pathogen into the body, the natural immunity system produce the appropriate antibodies for fighting that pathogen storing the information in memory cells. So if the pathogen is ever encountered again the body already has the necessary memory cells to destroy it before you can get sick.