Ham traditionally comes from a pig and more specifically refers to the hind leg meat. It is a processed food, requiring some form of smoking, salting or curing to be called ham. Locations in the United States and EU have laws that specify what qualifies as ham.
Ham is created using one of three procedures. Dry curing requires the meat be covered in salt and stored anywhere from eight months to two years in a dark, temperature-controlled rack. Wet curing uses a brine solution, soaking the ham thoroughly for upwards of two weeks. The final method, smoking, burns wood to create a persistent low heat over a long amount of time. Since ham is always preserved in some fashion, it is considered safe to eat, even without cooking. The process of creating a ham is said to have existed since Ancient Rome, and Cato the Elder is reported to have written about the creation of the meats as early as 160 B.C.