Plasma cells and most of T cells die after only a few days. However, the memory B cells and a few memory T cells survive.
Each plasma cell and T cell will only be programmed to only respond to the one antigen that they have already encountered. So they wait in the lymph nodes in case re-infection occurs, in which case they are ready to attack.
This way, although the first infection was dealt with in a few days to a few weeks by the primary response, the secondary response to re-infection is much quicker and much more powerful.
Because of this clever system, even if you are re-infected, you may not even know about it because no symptoms show! The infecting organism does not have the chance to cause disease. This is why many diseases can only infect you once.
This is not infallible though. There are some diseases that come in a variety of guises, for example the common cold and influenza (flu).
Although each time you get a cold you have a similar set of symptoms, each new cold is in fact caused by a slightly different virus with slightly different antigens.
This is not the worst of it though. Unfortunately, viruses have a relatively high mutation rate, which may alter their antigens. Even a slight change may mean that your memory cells do not recognise a disease you have had before.
This means then, that your response to it will be as slow as it was the first time.
In the past, to become immune to a disease you would have had to have contracted the disease at least once.
Nowadays, this need not be the case. Immunity can be artificially induced. This is achieved by injecting a vaccine so that you will form the necessary memory cells without much (if any) suffering.
This vaccine is, in fact, small quantities of the antigen attached to the offending organism.
To reduce the risk involved when taking the vaccine, the disease itself may have been artificially weakened.
This weakening is achieved by taking the disease cell and altering it (as in polio, smallpox and measles vaccines), killing it (as in whooping cough and typhoid vaccines), or by using altered toxins (as in the tetanus vaccine).
Your body will mount an attack and overcome this weakened strain of the disease quickly and easily - and memory cells will be created in the process.
This way, if you ever encounter the real disease, the memory cells are ready to be quickly stimulated and your immune system can destroy the disease before you even notice it!
If the activation of the immune system occurs naturally during an infection, this is termed natural immunity. Because in response to the antigens, Band T cells have gone into action and a memory has been produced, it is also termed active immunity. Vaccination would also be termed a form of active immunity.
However, passive immunity, which is not long term, is also a possibility. Antibodies from a mother may cross the placenta during pregnancy and remain in the infant for several months. Colostrum, the first breast milk produced for four or five days after giving birth, may also contain antibodies. These two examples could also be termed natural immunity.
Passive artificial immunity is used in the treatment of tetanus, which kills quickly, before a natural active response can occur. An injection of antitoxin is given which contains human antibodies taken from blood donors who have recently been vaccinated against tetanus. An immediate but temporary response is the result, because the antibodies would be identified as foreign and removed from the patient's body.