Consider, for one, the familiar example of a marble on the edge of a bowl. If we consider the marble and bowl to be an isolated system, then when the marble drops, the potential energy will be converted to the kinetic energy of motion of the marble. Frictional forces will convert this kinetic energy to heat, and at equilibrium, the marble will be at rest at the bottom of the bowl, and the marble and the bowl will be at a slightly higher temperature. The total energy of the marble-bowl system will be unchanged. What was previously the potential energy of the marble, will now reside in the increased heat energy of the marble-bowl system. This will be an application of the maximum entropy principle as set forth in the principle of minimum potential energy, since due to the heating effects, the entropy has increased to the maximum value possible given the fixed energy of the system.
If, on the other hand, the marble is lowered very slowly to the bottom of the bowl, so slowly that no heating effects occur (i.e. reversibly), then the entropy of the marble and bowl will remain constant, and the potential energy of the marble will be transferred as energy to the surroundings. The surroundings will maximize its entropy given its newly acquired energy, which is equivalent to the energy having been transferred as heat.  Since the potential energy of the system is now at a minimum with no increase in the energy due to heat of either the marble or the bowl, the total energy of the system is at a minimum. This is an application of the minimum energy principle.
Alternatively, suppose we have a cylinder containing an ideal gas, with cross sectional area A and a variable height x. Suppose that a weight of mass m has been placed on top of the cylinder. It presses down  on the top of the cylinder with a force of mg where g is the acceleration due to gravity.
Suppose that x is smaller than its equilibrium value. The upward force of the gas is greater than the downward force of the weight, and if allowed to freely move, the gas in the cylinder would push the weight upward rapidly, and there would be frictional forces that would convert the energy to heat. If we specify that an external agent presses down on the weight so as to very slowly (reversibly) allow the weight to move upward to its equilibrium position, then there will be no heat generated and the entropy of the system will remain constant while energy is transferred as work to the external agent. The total energy of the system at any value of x is given by the internal energy of the gas plus the potential energy of the weight:
where T is temperature, S is entropy, P is pressure, &mu; is the chemical potential, N is the number of particles in the gas, and the volume has been written as V=Ax. Since the system is closed, the particle number N is constant and a small change in the energy of the system would be given by:
Since the entropy is constant, we may say that dS=0 at equilibrium and by the principle of minimum energy, we may say that dU=0 at equilibrium, yielding the equilibrium condition:
which simply states that the upward gas pressure force (PA) on the upper face of the cylinder is equal to the downward force of the mass due to gravitation (mg).