We see epidemics, localized outbreaks, if seasonal flu exceeds what is called the threshold which is a rise in cases above a certain number along with how severe these cases are. We usually do have flu epidemics each year. But a pandemic is a much more severe flu affecting more of the population worldwide. Pandemics are usually caused by flu viruses that are unique to the population.
We know a lot about the flu and vaccines but sometimes the components of the vaccine which are the antigens for a particular flu virus are not the right choice for the flu viruses that actually circulate that year. It's an educated guessing game. Most people do not get the flu vaccine.