Ham isn’t toxic to cats, so a small amount won’t do any harm. However, even though it’s a good source of animal protein, it’s also high in sodium and sometimes fat, so it shouldn’t be given too often or in large amounts.
If you do decide to give your cat some ham as a treat, choose plain cooked ham that isn’t coated in honey and avoid giving ham that’s been cooked with other ingredients because these could be toxic.