It seems odd that something as intangible as the smoke from a fire could help foods last longer, but the effect has been known and used for longer than history records. Very thin pieces of fish or meat, smoked and dried over a low fire, remained edible for weeks or even months. Larger pieces required salt or long drying periods, but smoke added pleasant flavors and helped prevent surface spoilage. Modern smoked meats are more likely to be made with refrigeration in mind, so their storage life varies sharply.
The least complicated form of smoked meat is cooked over gentle heat in a smoke-filled chamber, whether a backyard charcoal barbecue or a compact electric smoker. Southern pulled pork and Texas-style brisket are classic examples of this type of smoked meat. In this case, the smoke adds flavor but does nothing to actually preserve the meat or extend its storage life. You can keep the meat food safe by holding it at a temperature above 140 degrees Fahrenheit for a few hours, but at room temperature it should be discarded after 2 hours.
Wet-Cured Smoked Meats
The complex chemical compounds in smoke can help prevent the surface of the meat from oxidizing and developing spoilage bacteria, but they do little for the interior. For meats to last longer, they must also be cured in a salt-based mixture. Modern hams and bacon are cured before smoking in a wet brine of salt, nitrites and flavorings, which inhibit bacterial growth. Usually they don't have enough salt to remain safe without refrigeration, though home-cured meats can be made salty enough to store safely in barrels of brine. They must be soaked to remove excess salt before they're edible, but they'll last for years if necessary.
Dry-Cured Smoked Meats
Dry-curing your smoked meats is an alternative method that can also provide excellent shelf life, because spoilage bacteria can't reproduce without moisture. The meats are first cured in a salt mixture and then smoked, and hung to dry in a controlled environment with carefully monitored levels of temperature and humidity. American-style country hams and Italian prosciutto are examples of this technique. They can be stored for years without refrigeration until they're cut. Thin strips of homemade jerky are less durable because they absorb moisture from the atmosphere and are best eaten within a month or two.
Commercially Smoked Meats
The smoked meats you find at your local supermarket or butcher's shop generally fall into the same categories. Most hams are wet-cured and require refrigeration, though some brands are specially prepared to remain food safe at room temperature until they're opened. Once opened, they spoil like any other meat and must be refrigerated. Smoked fish and smoked sausage must always be refrigerated, unless they're also dried. Dried versions can be stored for weeks or months in a well-ventilated location but must be discarded if they begin to develop mold or unpleasant odors.