Immunity is the ability of the human body to successfully fight a viral or bacterial infection. Over our lifetime, we acquire immunity in several different ways. We can broadly divide immunity into two main types – innate and adaptive immunity.