This is a simple implementation of the SIR epidemiological model. See Wikipedia for a description.
The number of new infections is proportional to the total number of infected people, the fraction of the population that remains susceptible, and the ratio of the total number of infections per case and the typical time to recover from an infection.