http://www.trueorigin.org/atp.asp says
How is ATP Produced?
ATP is manufactured as a result of several cell processes including fermentation, respiration and photosynthesis. Most commonly the cells use ADP as a precursor molecule and then add a phosphorus to it. In eukaryotes this can occur either in the soluble portion of the cytoplasm (cytosol) or in special energy-producing structures called mitochondria. Charging ADP to form ATP in the mitochondria is called chemiosmotic phosphorylation. This process occurs in specially constructed chambers located in the mitochondrion's inner membranes.
The mitochondrion itself functions to produce an electrical chemical gradient-somewhat like a battery-by accumulating hydrogen ions in the space between the inner and outer membrane. This energy comes from the estimated 10,000 enzyme chains in the membranous sacks on the mitochondrial walls. Most of the food energy for most organisms is produced by the electron transport chain. Cellular oxidation in the Krebs cycle causes an electron build-up that is used to push H+ ions outward across the inner mitochondrial membrane (Hickman et al., 1997, p. 71).
As the charge builds up, it provides an electrical potential that releases its energy by causing a flow of hydrogen ions across the inner membrane into the inner chamber. The energy causes an enzyme to be attached to ADP which catalyzes the addition of a third phosphorus to form ATP. Plants can also produce ATP in this manner in their mitochondria but plants can also produce ATP by using the energy of sunlight in chloroplasts as discussed later. In the case of eukaryotic animals the energy comes from food which is converted to pyruvate and then to acetyl coenzyme A (acetyl CoA). Acetyl CoA then enters the Krebs cycle which releases energy that results in the conversion of ADP back into ATP.
How does this potential difference serve to reattach the phosphates on ADP molecules? The more protons there are in an area, the more they repel each other. When the repulsion reaches a certain level, the hydrogens ions are forced out of a revolving-door-like structure mounted on the inner mitochondria membrane called ATP synthase complexes. This enzyme functions to reattach the phosphates to the ADP molecules, again forming ATP.
The ATP synthase revolving door resembles a molecular water wheel that harnesses the flow of hydrogen ions in order to build ATP molecules. Each revolution of the wheel requires the energy of about nine hydrogen ions returning into the mitochondrial inner chamber (Goodsell, 1996, p.74). Located on the ATP synthase are three active sites, each of which converts ADP to ATP with every turn of the wheel. Under maximum conditions, the ATP synthase wheel turns at a rate of up to 200 revolutions per second, producing 600 ATPs during that second.
ATP is used in conjunction with enzymes to cause certain molecules to bond together. The correct molecule first docks in the active site of the enzyme along with an ATP molecule. The enzyme then catalyzes the transfer of one of the ATP phosphates to the molecule, thereby transferring to that molecule the energy stored in the ATP molecule. Next a second molecule docks nearby at a second active site on the enzyme. The phosphate is then transferred to it, providing the energy needed to bond the two molecules now attached to the enzyme. Once they are bonded, the new molecule is released. This operation is similar to using a mechanical jig to properly position two pieces of metal which are then welded together. Once welded, they are released as a unit and the process then can begin again.