Contrary to popular belief in the United States, Cinco de Mayo is not a federal (national) holiday in Mexico. It is a regional holiday primarily celebrated in the state of Puebla, where the historical event it commemorates took place.
On May 5, 1862, a poorly equipped Mexican army under General Ignacio Zaragoza defeated a larger, better-armed French force at the Battle of Puebla. The victory was symbolic—it boosted Mexican morale and delayed the French advance—but it did not end the French intervention. France eventually occupied Mexico City and installed Maximilian I as emperor (1864–1867).
Cinco de Mayo became a Mexican-American cultural celebration in the 1960s–70s, later commercialized by beer and food companies into a widespread "Mexican St. Patrick's Day." It celebrates Mexican heritage broadly, not the Battle of Puebla specifically.
In short: In Mexico, May 5 is a local commemoration in Puebla; in the U.S., it's a pan-Mexican cultural festival.