During canning, air trapped inside the Mason jar (between the top of the food and the bottom of the lid) is forced out of the jar.
Canning lids buckle if the jar ring is overtightened. The air gets trapped and cannot escape from the jar due to the tight ring. It will then force its way out, deforming or buckling the lid.
You will have to change the lid and reprocess the food to can it again.