Immunity refers to the body's ability to resist infections or toxins by the action of specific antibodies or sensitized white blood cells. It is a critical aspect of epidemiology, the study of how diseases spread and can be controlled in populations. There are two main types of immunity: innate immunity and adaptive immunity.