Most viruses induce solid immunity so that once recovered from an infection the host is resistant to further attack by the same virus. This naturally occurring immunity is mimicked by vaccines which may consist of killed or modified whole virus, or part of a virus.