Chemical bonds are the attractions between atoms that hold them together to form compounds. There are three major types of bonding: covalent bonds that bind together molecular compounds, ionic bonds that bind salts and ionic crystals, and metallic bonds that bind the atoms of metals.
Most fuels, plastics, and natural products are molecular compounds, made of atoms bound together into molecules. The type of bonding joining the atoms of a molecule is covalent bonding, which occurs when the outer electrons of two atoms are shared between them, creating an attraction between the two atoms.
Covalent bonds are shown in chemical structures by lines (Figure 1, top) and in models by either showing 'sticks' or the overlap of the atoms (Figure 1, middle and bottom).
The electrons in a covalent bond are not always shared equally between the two atoms. When the sharing is unequal, one atom will have a very slight positive charge, and the other atom will be slightly negative. This crates a small electric dipole - molecules that contain a dipole are polar compounds. Whether a molecule is polar or non-polar will affect its properties, such as melting and boiling points, and hydrogen bonding.
Read more about covalent bonding on the Chemistry LibreText.
While covalent bonding involves sharing electrons between two atoms, ionic bonding involves the complete transfer of electrons from one atom to another, creating positive and negative ions. These ions are then held together by the attraction between their opposite charges. Ionic compounds form crystals based on these attractions.
Metallic bonding involves the complete sharing of the valence electrons of metal atoms, creating an "electron sea" in which electrons are free to move. This is part of the reason for the high conductivity of metals. Read more about metallic bonding at the Chemistry LibreText
Generally, energy will be released when a bond forms between two atoms, no matter what type of bond. Similarly, if a bond already exists between two atoms, energy will be required in order to break it. The amount of energy required to break a bond is the same as the amount of energy released when it forms.
Most chemical reactions involve both the breaking and making of chemical bonds. If the energy released by forming new bonds is greater than the energy needed to break the "old" bonds, energy will be released overall by the reaction. This energy may be lost as heat, or can be used for power.
For example, the combustion of methane (CH4) follows this chemical reaction:
This reaction involves the breaking of the four carbon-hydrogen bonds in methane and the oxygen-oxygen bond in O2. New bonds formed are the two carbon-oxygen bonds (in CO2) and hydrogen-oxygen bonds (in H2O). These new bonds have less energy overall than the original bonds, so energy will be released by this reaction. Releasing energy is a characteristic of combustion reactions - you may have noticed this when feeling a hot flame. The animation below illustrates the hydrocarbon combustion of methane.
Since a large amount of energy is released when forming the CO2 and H2O in combustion of hydrocarbons like methane, these are a good primary energy source. It also means that a large amount of energy would be needed to break the bonds in CO2 and form other molecules. This is one reason why photosynthesis requires so much energy (from sunlight) to convert CO2 to carbohydrates.