Chemical energy is the potential energy stored in the arrangement of atoms within molecules. Breaking chemical bonds requires energy, while forming new chemical bonds releases energy. The more energy that's released when a bond forms, the more stable that bond is. These bonds are stable because the same amount of energy must be put into these bonds to break them again (this is an example of conservation of energy). When bonds between atoms are broken or formed, this is called a chemical reaction.
Many energy-rich molecules are present on Earth; these are molecules that can undergo chemical reactions that make energy available for use. The most prevalent energy-rich molecule that exists on Earth is oxygen, just two oxygen atoms bound together and forming O2. These molecules combine with other molecules to give off energy. Almost any molecule that's a collection of carbon atoms (especially with hydrogen and oxygen) will react with oxygen to form carbon dioxide. Wood and other materials can be burned when there is oxygen present in what is called a combustion reaction. Burning wood transforms this chemical potential energy and releases it as radiant heat. Many other fuels can be burned in similar reactions.
Fossil fuels like petroleum, coal, and natural gas are some of the most energy-rich molecules that exist naturally on Earth. These are large hydrocarbon molecules that come from plants and animals that lived, died, and were buried hundreds of millions of years ago (see this external link for information about the carboniferous period). These fossil fuels are mined, drilled, and pumped to the surface to use as fuel for transportation, electricity generation, and other uses. Fossil fuels are all harnessed for the chemical energy they store. These are non-renewable resources - they are finite and limited in quantity.
Hydrogen is both a fuel and an energy currency (please see Hydrogen as an energy currency). It can be combusted like a fossil fuel, releasing its chemical potential energy, but unlike hydrocarbons, it does not produce CO2 in this reaction.
Below is an animation showing that a chemical reaction between methane and oxygen leads to freeing up chemical energy during hydrocarbon combustion. The drop down menu allows a choice of hydrocarbons to react with oxygen.