A real gas behaves like an ideal gas at higher temperature and lower pressure, as the potential energy due to inter-molecular forces becomes less significant compared with the particles' kinetic energy, and the size of the molecules becomes less significant compared to the empty space between them.