Chemical energy originates in the interactions of atoms and molecules. Generally, there is a rearrangement of electrons and protons, called a chemical reaction, which produce electric charges. The law of Conservation of Energy stipulates that energy can be transformed or converted but never destroyed. Therefore, a chemical reaction that decreases the energy in a system will contribute the energy lost to the environment, usually as heat or light. Alternately, a chemical reaction that increases the energy in a system will have taken this additional energy from the environment.
Biological life depends on chemical energy. The two most common sources of biological chemical energy are photosynthesis in plants and respiration in animals. In photosynthesis, plants use a special pigment called chlorophyll to separate water into hydrogen and oxygen. The hydrogen is then combined with carbon from the environment to produce carbohydrate molecules the plant can then use as energy. Cellular respiration is the reverse process, using oxygen to oxidise or burn a carbohydrate molecule such as glucose into an energy-carrying molecule called ATP, which can be used by individual cells.
Though it may not seem obvious at first, combustion such as occurs in gas-fuelled engines is a biological chemical reaction that uses oxygen in the air to burn fuel and power a crankshaft. Gasoline is a fossil-fuel derived from organic compounds. But, not all chemical energy is biological, of course. Any change in the chemical bonds of a molecule involves the transfer of chemical energy. The burning of phosphorus on the end of a matchstick is a chemical reaction that produces chemical energy in the form of light and heat using heat from the striking to initiate the process and oxygen from the air to continue burning. The chemical energy produced by an activated glow stick is mostly light with very little heat.
Inorganic chemical reactions are also frequently used to synthesise desired products or reduce undesirable ones. The range of chemical reactions that produce chemical energy are quite vast, ranging from simple reorganisation of a single molecule or simple combination of two molecules, to complex interactions with multiple compounds of various pH level. The rate of a chemical reaction generally depends on the concentration of the reactant materials, the surface area available between those reactants, the temperature and the pressure of the system. A given reaction will have a regular rate given these variables, and can be controlled by engineers manipulating these factors.
In some cases, the presence of a catalyst is required to start a reaction or to create a significant rate of reaction. Because the catalyst is not itself changed in the reaction, it can be used over and over again. A common example is the catalytic converter in an automobile exhaust system. The presence of platinum group metals and other catalysts reduces harmful substances into more benign ones. Typical reactions in a catalytic converter are reduction of nitrogen oxides to nitrogen and oxygen, oxidation of carbon monoxide to carbon dioxide, and oxidation of unburnt hydrocarbons to carbon dioxide and water.