The best known equation for real gases is the van der Waals equation. Real gases experience attractive forces between particles which should reduce the expected pressure they exert. Real gases occupy volume which reduces the volume actually available to each gas particle. To account for attraction van der Waals made the simple assumption that in order to attract, the particles must come close, and in fact collide. Energy can be transformed, but is neither created nor destroyed in chemical processes.
Energy is the capacity to do work.
In chemical systems we also say it is due to composition, though ultimately this reduces to positions of atoms and electrons relative to each other. Kinetic energy, potential energy, pressure, and volume are all examples of State Functions. They are all properties that depend only on the current state - they are all independent of the path used to reach this state. The First Law of Thermodynamics states that the energy of the Universe is constant. Thus it is another name for the law of conservation of energy.