Imagine a cylinder, closed at one end and fitted with a sliding piston at the other. Trapped between the piston and the blind end is an ideal gas. (Visualized as a lot of particles flying around like ricocheting rifle bullets, with random energies - loosely speaking, speeds - and random positions. Importantly, they neither attract nor repel one other.)

Push in the piston and then allow the gas to cool back to the temperature of the surroundings, for pushing in the piston will have warmed the gas up. It is easy to see that the gas will, if allowed to do so, push the piston back out again; to its original position. This is one example of "free energy".

It is called free energy as opposed to just energy because there is no energy stored in the compressed gas. The compressed gas cannot contain any potential energy (the energy something has by dint of its position in a force field, such as the energy deemed to be in a brick balanced on the lip of a cliff) because there is no force acting between the particles. There is no force tending to push the particles apart. This is not what pushes out the piston.

What then is responsible for the piston being pushed out again? The particles bang against the piston and push it out with innumerable tiny blows. Each time they hit they transfer a little of their kinetic energy (the energy of motion, the "smashing power" of a flying brick) to the piston; each time they hit they slow down a little.

Slowing down equals cooling in thermodynamics, where temperature is identified as a measure of how fast particles are moving. (More properly: temperature is proportional to the kinetic energy of the average particle.) The slowed, cooled, particles pick up kinetic energy from the surroundings when they bang against the - vibrating - particles that make up the walls of the cylinder. This speeds them up again and the whole process repeats.

Thus the process consists in converting the heat energy of the surroundings into work energy (the capacity to push a mass with a force through a distance) and using this work energy to drive the piston back out. It is not energy stored in the compressed gas which pushes the piston, it is the compressed gas's ability to convert heat to work - in thermodynamic terms this facility ultimately derives from the lowering of its entropy during the compression.

For completeness, imagine, now, that the gas particles repel each other. Again compress the gas and proceed as before. This time the piston is thrust back out again with a greater force so that there is more energy. The free energy in this case is defined to be the total energy used pushing out the piston, i.e. the sum of the ideal gas energy as above and the potential energy due to the particles repelling each other.

It might help to see that the free-energy of the ideal gas above is not real energy by noticing that the compressed ideal gas has the same mass as the uncompressed ideal gas. By E = mc2, they must therefore have the same energies.

I assume I have just described Helmholtz free energy - which measures the maximum ammount of work energy it is possible to extract during a process. I am mystified by Gibbs free energy.