Modern-day canning involves processing food in glass jars that are sealed with lids and screw bands. Several factors can affect whether or not the jars form a tight seal, including defective lids, nicks in the jar rims and food left on the jar rims.
The bottom edges of today's canning lids are coated with a thin layer of rubber that comes into contact with the top edge of the jars. Standard canning jars are the best choice, since the rims on empty mayonnaise and peanut butter jars are not as wide and may create a poor seal. Inspect all of your standard canning jars for nicks and scratches that will interfere with the sealing process.
Proper canning requires using the water bath or pressure canner method; both create a vacuum that pushes the air out between a jar's rim and lid. The seal is complete once all the air in a jar is exhausted. You can safely process high-acid foods, such as tomatoes and pickles, using a water bath. This process calls for a large kettle that heats the food in jars to the boiling point, killing any organisms that the acid hasn't destroyed. Pressure canning involves processing jars in steam that reaches a higher temperature capable of killing all toxic organisms.
Both home-canning methods require the use of new lids that will form a tight seal once you remove the jars from the canning mechanism and allow them to cool. Lids often make a sharp pinging sound as the seal forms; alternatively, the lid pops down if you tap it with a spoon. If a jar doesn't seal, reprocess it using a brand new lid or refrigerate it and use its contents within a few days.