Since ideal gas is defined as one in which all collisions between atoms or molecules are perfectly elastic and in which there are no intermolecular attractive forces, there is no such thing in nature as a truly ideal gas. On the other hand, all real gases approach the ideal state at low pressures (densities). At low pressures molecules are far enough apart that they do not interact with one another.
In other words, the Ideal Gas Law is accurate only at relatively low pressures (relative to the critical pressure pcr) and high temperatures (relative to the critical temperature Tcr). At these parameters, the compressibility factor, Z = pv / RT, is approximately 1. The compressibility factor is used to account for deviation from the ideal situation. This correction factor is dependent on pressure and temperature for each gas considered.