All matter possesses energy in two forms, depending on whether it is at rest or in motion. An object at rest possesses potential energy. If it is in motion, it possesses kinetic energy and it is this energy that can perform work. To illustrate the connection between the two, consider a weight on a table. The weight possesses potential energy because of its position in the Earth's gravitational field. However, that potential energy, or potential to do work, cannot be realized unless the weight moves, that is, it's potential energy is converted to kinetic energy. This could be accomplished by attaching the weight to one end of a rope and wrapping the other end around a shaft. If the weight is dropped, the rope turns the shaft using the kinetic energy of the weight. Likewise, molecules in a concentration gradient are like the weight on the table. They possess potential energy but until they move (diffuse down the concentration gradient) they cannot do work. Thus, the hydrogen ion gradient across the inner membrane of a mitochondrion cannot be used to generate ATP unless the hydrogen ions can diffuse down the gradient.
Also implicite in the first law is the idea that no machine, including chemical machines, can do work without an energy source. The amount of work that can be done by a system, whether mechanical or chemical, is a function of the size of the system. Work is always defined as the product of two factors, force x distance for example. One factor is an intensity factor which is independent of the size of the system; the other is a capacity factor and is directly proportional to the size of the system. (In the example, force is the intensity factor and distance is the capacity factor).
In biochemistry, energy and work are expressed in calories; a calorie is the amount of energy required to raise the temperature of 1 gram of water by 1 degree Celsius, specifically from 15o to 16o. In principle, the same result can be achieved by mechanically stirring a paddle which leads to a mechanical equivalent of heat. There is also an electrical equivalent which allows us to describe work done by, or in, an electrical field.
The Second Law and Entropy
Left to themselves, events in nature take a predictable course. Apples fall from trees, pyramids crumble, things fall apart. Yet nothing in the first law expressly forbids these events to operate in reverse if sufficient energy can be absorb from the surroundings. The fact that they do not suggests that there is a relationship between the capacity for spontaneous energy absorption and the direction of spontaneous reactions. The thermodynamic function that provides this link is called entropy, which is defined as the amount of energy in a system not available for doing work. It is also corresponds to the degree of randomness in the system.
One of the most difficult aspects of entropy to grasp is why entropy increases even as apparently ordered reactions which appear to maintain order are occuring. To illustrate that, let me give you an analogy, courtesy of my wife. Consider a piece of fabric as a system with a fixed amount of energy. As it is made of matter, it also possess a certain level of order (entropy). We can increase its level of order (decrease randomness or entropy) by turning it into a dress (by spending our own energy to cut and sew the dress). However, as a part of the this process we are required to sacrifice part of the fabric (as useless scraps) in order to make the dress. At some point, the dress is converted into a smaller dress for your daughter, while sacrificing some of the fabric of the dress as scraps. Finally, you convert the small dress into a doll's dress. At each step you maintain an ordered system (the dresses) but at the expense of converting more of the fabric into scraps which cannot be turned into anything useful. In much the same way, throughout a chemical system, everytime energy is converted from one form to another, or transferred from one molecule to another in order to maintain the order of a cell, some of the energy is converted into a form which is no longer useful to the cell; ultimately all the energy of the cell will be converted into a useless form. This implies that living things must continually obtain energy from elsewhere, in order to maintain their ordered function, at the expense of order elsewhere. Another way of expressing this is to say that spontaneous changes proceed in the direction that decreases the capacity for change (eg., diffusion down a concentration gradient, heat flow from warm to cold, etc). These changes can be reversed if an outside agent expends energy to reverse the changes but the external agent must change in such a way as to reduce its capacity for further change. In the dress example above, if you wanted to remake the original dress, you would have to bring in extra fabric from another piece to replace the fabric you had removed in making the smaller dresses, but in the process, you would be reducing your ability to make a new dress out of the second piece of fabric.
Chemical and physical processess are almost invariably accompanied by the generation or absorption of heat, which reflects changes in the internal energy of the system. The amount of heat transferred is related to the free energy change in the system. The energy absorbed or given of as heat is called the heat content or enthalpy. Processes which generate heat (like combustion) are said to be exothermic; those that absorb heat (like ice melting or water evaporating) are said to be endothermic.