A. natural selection
Over time, the individual staph bacteria that are not resistant die when they meet penicillin, and the resistant staph survive. These resistant staph then reproduce to create other resistant staph bacteria. Over time, only the resistant staph remain and the population of staph as a whole becomes resistant to penicillin.