I’m not sure how peanut butter is sealed but usually foil lids are sealed with an induction sealer. Cap it’s tightened down (if not potential for a bad deal) and the foil in the cap is pushed tight to the bottle/jar. The metal heats up, melts the plastic and seals.