An epidemic is a sudden increase in the number of cases of a disease above what is normally expected in a specific area or population. Epidemics can refer to a disease or other specific health-related behavior with rates that are clearly above the expected occurrence in a community or region. Epidemics can be caused by contagious diseases such as measles, smallpox, and polio, but they can also describe things that arent contagious like teen vaping or obesity. An epidemic may be restricted to one location, but if it spreads to other countries or continents and affects a substantial number of people, it may be termed a pandemic.
To summarize, an epidemic is a sudden increase in the number of cases of a disease above what is normally expected in a specific area or population, while a pandemic is an epidemic that is actively spreading to multiple regions across the globe.