A spontaneous process is the time-evolution of a system in which it releases free energy (usually as heat) and moves to a lower, more thermodynamically stable energy state. The sign convention of changes in free energy follows the general convention for thermodynamic measurements, in which a release of free energy from the system corresponds to a negative change in free energy, but a positive change for the surroundings.
A spontaneous process is capable of proceeding in a given direction, as written or described, without needing to be driven by an outside source of energy. The term is used to refer to macro processes in which entropy increases; such as a smell diffusing in a room, ice melting in lukewarm water, salt dissolving in water, and iron rusting.
The laws of thermodynamics govern the direction of a spontaneous process, ensuring that if a sufficiently large number of individual interactions (like atoms colliding) are involved then the direction will always be in the direction of increased entropy (since entropy increase is a statistical phenomenon).
For a reaction at constant temperature and pressure, ΔG in the Gibbs free energy is:
The sign of ΔG depends on the signs of the changes in enthalpy (ΔH) and entropy (ΔS), as well as on the absolute temperature (T, in kelvin). ΔG changes from positive to negative (or vice versa) where T = ΔH/ΔS.
For heterogeneous systems where all of the species of the reaction are in different phases and can be mechanically separated, the following is true.
When ΔG is negative, a process or chemical reaction proceeds spontaneously in the forward direction.
When ΔG is positive, the process proceeds spontaneously in reverse.
When ΔG is zero, the process is already in equilibrium, with no net change taking place over time.
We can further distinguish four cases within the above rule just by examining the signs of the two terms on the right side of the equation.
When ΔS is positive and ΔH is negative, a process is always spontaneous
When ΔS is positive and ΔH is positive, a process is spontaneous at high temperatures, where exothermicity plays a small role in the balance.
When ΔS is negative and ΔH is negative, a process is spontaneous at low temperatures, where exothermicity is important.
When ΔS is negative and ΔH is positive, a process is not spontaneous at any temperature, but the reverse process is spontaneous.
For Homogeneous systems where all of the species of the reaction are in the same phase, ΔG cannot accurately predict reaction spontaneity.
The second law of thermodynamics states that for any spontaneous process the overall ΔS must be greater than or equal to zero, yet a spontaneous chemical reaction can result in a negative change in entropy. This does not contradict the second law, however, since such a reaction must have a sufficiently large negative change in enthalpy (heat energy) that the increase in temperature of the reaction surroundings (considered to be part of the system in thermodynamic terms) results in a sufficiently large increase in entropy that overall the change in entropy is positive. That is, the ΔS of the surroundings increases enough because of the exothermicity of the reaction that it overcompensates for the negative ΔS of the system, and since the overall ΔS = ΔSsurroundings + ΔSsystem, the overall change in entropy is still positive.
Another way to view the fact that some spontaneous chemical reactions can lead to products with lower entropy is to realize that the second law states that entropy of an isolated system must increase (or remain constant). Since a negative enthalpy change in a reaction means that energy is being released to the surroundings, then the 'isolated' system includes the chemical reaction plus its surroundings. This means that the heat release of the chemical reaction sufficiently increases the entropy of the surroundings such that the overall entropy of the isolated system increases in accordance with the second law of thermodynamics.
Spontaneity does not imply that the reaction proceeds with great speed. For example, the decay of diamonds into graphite is a spontaneous process occurs very slowly, taking millions of years. The rate of a reaction is independent of its spontaneity, and instead depends on the chemical kinetics of the reaction. Every reactant in a spontaneous process has a tendency to form the corresponding product. This tendency is related to stability. Stability is gained by a substance if it is in a minimum energy state or is in maximum randomness. Only one of these can be applied at a time. e.g. Water converting to ice is a spontaneous process because ice is more stable since it is of lower energy. However, the formation of water is also a spontaneous process as water is the more random state.
See also 
- Endergonic reaction reactions which are not spontaneous at standard temperature, pressure, and concentrations.
- Diffusion spontaneous phenomena that minimizes Gibbs free energy.