Active immunity is built due to the presence of
Memory cells
Active immunity develops in the body on being exposed to a live pathogen. The pathogen establishes an infection in the body and the symptoms become visible in the patient. The patient's immune system restores a healthy state by means of humoral and cellular immunity. Active immunity however, is also long lasting. Once recovered, the person will have long lasting immunity to the disease. This persistence of protection is due to the formation of memory cells in the body that help encounter a second attack by the same pathogen.