Kelvin-Helmholtz mechanism

I gather that this term refers to a heat generating process in the interior of giant gas planets like Jupiter and Saturn. Can someone elaborate a bit on the mechanism?

Is it referring to the tendency of any ‘squeezed’ matter (solid, liquid, or gaseous) to heat up? Or is it simply a manifestation of “PV=nRT” where high pressure equates to high temperature in gases? Or perhaps the mechanism depends on the release of heat by a gas as it condenses under pressure (i.e. heat generation due to a phase transition)?

Thanks!

The “Kelvin Helmholtz Mechanism” refers to the contraction of a gaseous body, such as a star or a nebula, during which graviational energy is transformed into thermal energy.