In thermodynamics, a reversible process is a process whose direction can be "reversed" by inducing infinitesimal changes to some property of the system via its surroundings, while not increasing entropy. Throughout the entire reversible process, the system is in thermodynamic equilibrium with its surroundings. Since it would take an infinite amount of time for the reversible process to finish, perfectly reversible processes are impossible. However, if the system undergoing the changes responds much faster than the applied change, the deviation from reversibility may be negligible. In a reversible cycle, a reversible process which is cyclic, the system and its surroundings will be returned to their original states if the forward cycle is followed by the reverse cycle.
Thermodynamic processes can be carried out in one of two ways: reversibly or irreversibly. Reversibility refers to performing a reaction continuously at equilibrium. In an ideal thermodynamically reversible process, the energy from work performed by or on the system would be maximized, and that from heat would be minimized; heat cannot fully be converted to work and will always be lost to some degree (to the surroundings). The phenomenon of maximized work and minimized heat can be visualized on a pressure-volume curve, as the area beneath the equilibrium curve, representing work done. In order to maximize work, one must follow the equilibrium curve closely.
Irreversible processes, on the other hand, are a result of straying away from the curve, therefore decreasing the amount of overall work done; an irreversible process can be described as a thermodynamic process that leaves equilibrium. When described in terms of pressure and volume, it occurs when the pressure or the volume of a system changes so dramatically and instantaneously that the other (pressure or volume in this case) does not have time to catch up. A classic example of irreversibility is allowing a certain volume of gas to be released into a vacuum. By releasing pressure on a sample and thus allowing it to occupy a large space, the system and surroundings are not in equilibrium during the expansion process and there is little work done. However, significant work will be required, with a corresponding amount of energy dissipated as heat flow to the environment, in order to reverse the process (compressing the gas back to its original volume and temperature).