Both ham and gammon are cut from the hind leg of a pig.
The meat is the same but the preparation and treatment is different. Ham and gammon are both cured meats ie salted - that is why its called processed like bacon. And should be eaten sparingley.
The whole Ham is meat that is cut from the carcass and then treated. Gammon is a piece of meat that is cut from the carcass after the brining treatment. Usually a section of the leg which has had the bone taken out - boned and rolled.
There seems to be some confusion over cooked and uncooked - not the case. You can buy sliced cooked gammon in packs.