So why does the hot water method work? It comes down to thermal expansion. Using the equation for volume,
we can begin to see how it would work. Since the hot water is the same temperature for both the metal lid of the jar and the glass body, that stays constant. The original volume of the jar and the lid at the point where they screw together interlock, so should be very similar in volume, so that should not affect the change in volume either. What does vary between the lid and the jar is the volumetric coefficient, which for glass is 25.5 x 10⁻⁶ K⁻¹ (at 20°C), and for steel (the most common metal jar lids are made of) is anywhere from 33.0 to 39.0 x 10⁻⁶ K⁻¹ (again at 20°C).
So if we can disregard the change in temperature and the original volume as the same for both the glass and the lid, calling it "x", the equation becomes
which by using the coefficients stated above shows that the metal will expand more than the glass will, so it will become easier to twist the lid off.