If a gas is compressed and then allows expanding suddenly then temperature of the gas decreases. This phenomenon is known as joule Thomson effect.
Reason: Strong inter-molecular Force is present between gas molecules at compressed state. During expansion as the molecules move for away from each other so they need to work against the inter-molecular attraction force. The energy for this purpose is taken from the gas itself. For this reason temperature decreases.
“All gases cannot be liquefied by Joule Thomson’s effect only”
Experimentally it is seen that every gas has a fixed temperature below which Joule-Thomson effect can be applied for liquefying the gas. But if the gas remains above that fixed temperature then temperature increases when Joule-Thomson effect is applied. So, the gas cannot be liquefied by applying Joule-Thomson effect above that temperature. This temperature is known as inversion temperature. For example, the inversion temperature of hydrogen is -80o C. So, if hydrogen remains above -80o C temperature, its temperature increases when Joule-Thomson effect is applied. That means its temperature cannot be decreased. As a result gases cannot be liquefied by applying Joule Thomson effect.