Epidemic and pandemic are similar terms that refer to the spread of infectious diseases among a population. There are two main differences between epidemic and pandemic. The term "pandemic" normally is used to indicate a far higher number of people affected than an epidemic. "Pandemic" also refers to a much larger region being affected. In the most extreme case, the entire global population would be affected by a pandemic.
The terms epidemic and pandemic usually refer to the rate of infection, the area that is affected or both. An epidemic is defined as an illness or health-related issue that is showing up in more cases than would normally be expected. In the case of a pandemic, even more of the population is affected than in an epidemic. A pandemic typically is in a widespread area rather than being confined to a particular location or region.
To envision an epidemic, one could take a hypothetical example of numerous people contracting the same flu-like symptoms in a particular area. More cases then show up throughout the region, but the concentration remains localized in a few cities. Some cases then turn in other regions, but the illness never spreads elsewhere. In the hubs where the illness is seen, the infection rate remains higher than would normally be expected. This is a classic example of an epidemic.
A more widespread example would be if the rate of infection started growing exponentially so that more and more cases cropped up locally. Under favorable circumstances, the rate of infection can grow very fast. Cases might then be found in many other regions, and the rate of infection would exceed even that of an epidemic. In some scenarios, most of a country's population — or even people in other countries — can become affected by this disease. This is a pandemic.
If people throughout a country are affected but the rate of incidence is not high enough, it still would be considered an epidemic. Conversely, a disease that affects a very high percentage of a small population in a large area — such as a remote area Africa — might be called a pandemic. A pandemic might be regionally localized if it involves more cases than a simple epidemic, and an epidemic might be widespread if not enough of the population is affected to term it a pandemic. In the latter case, however, it still might be called a pandemic by some people, just because the geographical area is so widespread.
These subtle but significant differences in how the terms epidemic and pandemic are used might be confusing, but in most cases, epidemics turn into pandemics by growing exponentially because of the nature of the disease. Pandemics typically are seen as more serious situations. The term "epidemic" might also be used to refer to the spread of things other than diseases, such as problems like drug use or even metaphorically to refer to innocuous happenings. It is unlikely for "pandemic" to be used in this sense, however.