SIR model

The SIR model is a simple mathematical model of epidemics. An epidemic is when the number of people infected with a disease is increasing in a population. 
S, I, and R stand for:
Below is a graph of a solved SIR model. The bottom (x) axis is time, and the left (y) axis is the population or the number of people. 
Blue represents the number of susceptible people. At the beginning of the epidemic, the number of susceptible (blue) people decreases as the number of infected (green) people increases. Gradually the number of recovered (red) people increases. In this particular model, after the epidemic is over, all people have been infected and recovered. This is not always the case; sometimes, some susceptible people remain uninfected.
This model is also missing some parts, such as creating new susceptible people by being born and the removal of susceptible, infected, and recovered people who die. More complicated models can include these parts. 
Also, this model does not work well for every disease. It works well where people recover from a disease and become immune, such as measles. Not all infectious diseases follow this pattern. For instance, people infected with HIV never recover, and there is no vaccine, so there is no group of recovered people, only susceptible and infected people. There is also the case where people recover from a disease but do not become immune or lose their immunity over time. For instance, when people get the flu, they are generally only immune for a short time before they become susceptible again.
There are also different kinds of models when as the disease is spread through the water, such as in the case of cholera, or by a vector like a mosquito, such as malaria.