Basically, liquid smoke is just what the name implies: smoke in liquid form. Smoke is passed through water so that the flavor is imparted to the liquid. The smoke is produced by burning wood chips or sawdust. The smoke-infused water may be concentrated and additional chemicals may be added to enhance the flavor of the product.
Your vote on this answer has already been received
Liquid smoke is a seasoning like Worcestrershire sauce or Steak sauce and can be found near these things at most grocery stores, usually right around the mustard. I have never used this in ham and don't know how to make a substitute.I have used it in steak, burgers, roast and imagine if you rubbed a ham with it, it would add a nice flavor ( if the ham is pre-smoked, the flavor is there already). I buy pre-smoked ham. I know that you can find ham base, which is similar to beef or chicken base (used to make broth) near the soups