Pathogen evolution, selection and immunity