Thermochemistry: Energy Changes in Chemical Reactions
Thermochemistry deals with transfers of energy between reacting chemicals and the world around them.
Systems, Surroundings, and Boundaries
The word system refers to that particular part of the universe we wish to study. The system might be the chemicals reacting in a beaker or the chemicals in a battery cell reacting to give electricity, or the system of a living cell.
The word surroundings refers to whatever is entirely outside the defined system, everything in the universe except the system itself.
A boundary, real or imaginary, separates the system from its surroundings. When the system is in a beaker, the boundary exists wherever the solution contacts the beaker or the air above it. If the boundary can prevent any transfer of heat between the system and the surroundings, we say that the system is insulated from its surroundings. Styrofoam makes a good insulating boundary for keeping a cup of coffee hot, but no material is a perfect insulator.
Another term that is used frequently is the state of a system. Each system has a state defined by listing its temperature, pressure, volume, and composition (including concentration terms). We say that a system undergoes a change of state whenever any change occurs in one or more of the variables that define the system.
Heats of Reaction
In thermochemistry we are concerned with the exchange of energy between a chemical system and its surroundings. Sometimes chemical changes are able to bring energy into the system. These are endothermic changes. An example is the charging of a battery, in which energy from an external source becomes stored in the battery in the form of chemical potential energy. Photosynthesis is also endothermic as far as the plant is concerned, and the needed energy (only 0.04%) is imported from the sun. When endothermic changes occur by themselves within an uninsulated system, we often notice a cooling effect in the surroundings. This is what happens to cool your drink with ice or when you use an "instant cold" compress from the drugstore.
Many chemical reaction are able to release energy to the surroundings. Such changes are described as exothermic. A typical example is the combustion of gasoline. Heat transfer away from the system (if uninsulated) and into the surroundings, where the temperature increases.
The form of the energy absorbed or released during a change can vary. It sometimes appears as light, or electrical work, but most often occurs only as heat. When the entire energy change of a reaction involves heat, the amount of heat is called the heat of reaction and is usually represented by the symbol 'q'.
We show exothermic reactions by q = -ve meaning that energy has been lost from the system. Endothermic reactions are documented by q = +ve meaning that energy was absorbed by the system.
The actual amount of heat of reaction for a given change in a system depends to some extent on the conditions under which we carry out the reaction. It depends on the physical states of the reactants and products; it depends on the initial temperature of the system; and it depends somewhat on whether the volume of the system or its pressure is held constant or is permitted to change.
To simplify matters a great deal, chemists noticed a long time ago that most reactions are carried out in open beakers or vats under atmospheric pressure. So we will also limit ourselves to these conditions and some new terms to explain these conditions.

The first term, enthalpy, refers to the total value of energy of a system when it is at constant pressure. It is symbolized by the letter 'H'. When a system reacts at constant pressure it will either gain or lose energy and we say that the enthalpy of the system has gone through a change or an enthalpy change, which is symbolized by ΔH.   Δ means "change in".
ΔH is defined by the equation:        ΔH = Hfinal - Hinital
Hfinal is the enthalpy of the system in its final state and Hinitial is the enthalpy of the system in its initial state.
For a chemical reaction the above equation can be expressed much more nicely as
           ΔH = Hproducts - Hreactants
The above equation simply put means "the total heat content of the products minus the total heat content of all the reactants".
After having gone to all this effort to give a formal definition of H, it is perhaps a bit disappointing to learn that we cannot actually calculate it from measured values of Hfinal and Hinitial. This is because the total enthalpy of the system depends on its total kinetic energy plus its total potential energy, and these values can never be determined. The good news is that we don't need to know it. We care only about what our system could do for us (or to us!) right here at a particular place on this planet. For example, when we want to know the yield of energy from burning gasoline, we really do not care what its total enthalpy is in either its initial or final state. All we care about is by how much the enthalpy changes, because it is only this enthalpy change that is available to us. In other words, we don't need Hinital and Hfinal , but we can calculate H by direct measurement.
Enthalpy Change and Heat of Reaction at Constant Pressure
The enthalpy change for a reaction can make itself known in the surroundings either as work or as heat energy or as some of each. When all of the enthalpy change appears as heat, we have a way to measure the enthalpy change for a reaction, because in this circumstance H is equal to the heat of reaction at constant pressure
ΔH = q (at constant pressure)
The sign of q, defined earlier, is actually determined by the sign of ΔH.   If ΔH is negative so q is negative for exothermic changes.   ΔH is positive and so q is positive for endothermic changes.
Energy Conservation
One important truth has been strongly implied so far, but never stated in so many words - the amount of energy that leaves a system is exactly the same as the amount that goes into the surroundings. No energy is lost. It just transfers from one place to another, and some of it might change from one form to another. The formal statement of this truth is called the law of conservation of energy.