Immunity: Principles and application in medicine and public health