Reaction energies
The general rule, then, is that when chemical bonds form energy is released. The opposite case is much easier to imagine: when chemical bonds are broken, energy must be supplied or absorbed.

Since both bond-breaking and bond-making generally occur in all but the simplest reactions it is the net of these two energy changes which determines whether a reaction liberates or absorbs energy. Both the formation of sodium chloride and of water liberate heat. Such reactions are called exothermic. Other reactions in which energy is absorbed are called endothermic.