

In case of ideal gas, we assume that the intermolecular force is zero. Hence, while we change the distance between the molecules, no work is done. Hence, internal energy of an ideal gas consists of internal kinetic energy which depends on the temperature of the gas. Thus, it is kinetic energy only.
On the contrary, in case of a real gas, intermolecular forces are not negligible. Hence, in this case, it has both internal kinetic and internal potential energy which depends on temperature and volume respectively.
