Most of us use the terms gammon and ham interchangeably and few of us are sufficiently sophisticated consumers to notice the difference when we eat either gammon or ham. In fact both ham and gammon are cut from the leg of a pig.
The meat is the same but the preparation and treatment is different. Ham and gammon are both cured meats. This means that they are treated with salt, known as brining, and other substances before being eaten. Ham is meat that is cut from the carcass and then treated. Gammon is meat that is cut from the carcass after the brining treatment. Both gammons and hams might also be smoked.
Traditionally, regional variants in the process and the ingredients used would bring different flavours to the cured meats. This explains the origin of distinctive varieties such as York ham, Bayonne ham and Prague ham. Air dried hams are also cured first but then usually eaten raw whereas brined hams are baked or boiled before serving.