The bonds that hold molecules together contain the chemical energy available in a substance. However, a chemical reaction is a complex “dance” of atoms and molecules. Different reactions with the same substance can produce varying amounts of energy, and some reactions even consume energy.
TL;DR (Too Long; Didn't Read)
The bonds that hold molecules together contain the chemical energy available in a substance.
Types of Chemical Bonds
All molecules are made up of atoms that are bonded to one another with tiny bundles of energy. In chemistry, you study many kinds of bonds, some of which are strong, and others that are weak. The strongest bonds contain the most energy; the weakest ones have the least. For example, strong covalent bonds form when atoms share electrons, such as when hydrogen and oxygen combine to form water. The ionic bonds between sodium and chlorine in table salt are weaker than covalent bonds. Hydrogen bonds hold neighboring water molecules together to form snowflakes; these bonds are among the weakest.
Accounting for Energy
Not all of the energy in every bond in a molecule is used up in a typical reaction. When a chemist measures the energy given off from a chemical reaction, she carefully measures how much of each reactant she has and records the ambient temperature and pressure before and after the reaction. As the reaction takes place, some chemical bonds are broken, some are unaffected, and others are formed. What matters is the net energy change you get when the reaction is done. If the energy in the molecular bonds adds up to a smaller number at the end, heat is usually released into the environment. If the reverse is true, the reaction has consumed heat from the environment.
Exothermic vs. Endothermic Reactions
Some chemical reactions give off heat energy, but others take heat from the environment. Reactions that produce heat are exothermic; those that consume heat are endothermic. When you burn logs in a fireplace, for example, the carbon and hydrogen in the wood combine with oxygen in the air to produce heat, carbon dioxide and water vapor. That is combustion, an exothermic reaction. When you dissolve table salt in water, the final temperature of the solution is a little lower than it was at the start; this is an endothermic reaction.
Spontaneous vs. Nonspontaneous Reactions
Depending on the chemical energy present in the environment and the substances themselves, a reaction might start on its own, or it might need extra energy to kick-start the process. For example, gasoline is a mixture of molecules that contain a lot of energy but don’t ignite by themselves. Under normal conditions, they need a spark. Chemists call reactions that need extra energy nonspontaneous. Other reactions, such as the explosion you get from dropping sodium metal into water, happen by themselves. Chemists call that kind of reaction spontaneous.