People who like to can foods and jams at home can use a hot water bath to can and preserve their foods. The foods being canned must be acidic, with a Ph level equal to or less than 4.5. To can non-acidic foods, a home canner must use a pressure canning device. This is for safety, as botulism is a risk with improperly canned foods.
Anyway, the heat from a hot water bath will kill all molds, spores and yeast in acidic foods, allowing them to be preserved for months (as long as they are not exposed to oxygen after the heating process. Canning things like meats and non-acidic vegetables require more heat to kill all microorganisms (115 degrees centigrade to be exact). Boiling water can only reach temperatures of 100 degrees centigrade unless there is pressure to prevent the steam from escaping; hence the need for a pressure canner.