Generally, the difference between pandemic and epidemic is one of concentration and geographic reach. Epidemics occur in a specific area which can be a city, state or even an entire country as long as the incidence of the disease remains relatively constant with no exponential growth, and localized. Pandemics are more widespread, and affect a larger amount of people – an entire continent or world wide. HIV, the virus causing AIDS is considered a pandemic. As was the Bubonic plague and small pox.
Colloquially, when the word epidemic refers to a high rate of infection – higher than you would normally expect to be the case. There are frequent epidemics of Dengue fever in the tropics; a virus spread by infected mosquitoes. Seasonal flu is not considered to be an epidemic, even though it has a high rate of occurrence, because it is expected that many people will contract the flu. It can become an epidemic, however, if the number of cases is many more than is historically usual for the seasonal flu. This can become a pandemic if the cases start increasing exponentially and spreading to new populations and geographic locations unexpectedly.