The concept of liquefaction of gases works on the principle of intermolecular forces of attraction between the gas molecules. Gases liquefy when these forces increase between the molecules, binding them together. But an ideal gas is one where the molecules do not influence each other, the explanation comes from Joule Thompson effect.
Solve any question of Thermal Properties Of Matter with:-