Immunity due to natural infection happens when your body fights off a disease and builds long-term protection against it. After you recover from certain infections, your immune system remembers the invader. It creates antibodies, which are proteins that recognize and attack that specific pathogen if it tries to infect you again.
This type of immunity is different from vaccine-based immunity, though both train your immune system. Natural infection often produces a broader immune response because your body encounters the whole pathogen. Hepatitis B is a common example where past infection creates lasting immunity. Your body makes specific antibodies that stay in your blood for years or even your entire life.
Doctors can measure natural immunity through blood tests that look for specific antibodies. These tests show whether you were infected in the past and if you now have protection. Understanding your immunity status helps you and your doctor make informed decisions about your health and future vaccination needs.