The deviation of real gases from ideal behavior is due to wrong assumptions made in the kinetic theory of gases. These are
(a) There is no force of attraction between the gas molecules.
(b) Volume of the gas molecule is negligible when compared to the volume of gas. If assumption
(a) is correct, the gas will never liquefy. But gases liquefy when cooled and compressed. The assumption
(b) can be true only when volume of the gas is large and pressure is very low, and hence volume of the molecules cannot be neglected.