When studying energy transfers in chemical reactions, it is important to remember that it all happens on a small scale, as we say at the atomic level. Atoms and molecules are responsible for the transmission of tiny amounts of energy, but when they come together we have energy flow on a bigger scale.
Energy moves between systems of different temperature (along a temperature gradient) in such a way that high energy systems give off energy to low energy systems, e.g. hot to cold. When the temperatures become equal there is no transfer. Remember, it's all about balance!
Energy moves by convection, conduction and radiation and when things get hotter, they also get bigger. This is because when atoms gain kinetic energy (energy associated with movement), they move around faster, so they expand. When they lose heat and consequently kinetic energy (i.e. get colder), they contract.
A thermodynamic system is one that exchanges energy with the area around it. If the system is 'in equilibrium', it is actually balanced and 'happy' on its own, so it becomes a closed system, i.e. it does not exchange energy.
Thermodynamics are 'guided' by a number of laws:
If two systems are in equilibrium with a third system, then they are in equilibrium with each other.
This means that, for three systems (A, B and C), if A has the same energy as C and B has the same energy as C, then A also has the same energy as B.
When energy is added to a system, some of it stays in and increases the overall energy and some of it leaves the system, but does work in the area around it. By 'work' we mean that there is an effect in the area around the system. For example, when we heat a pot of water, the energy increases first. Further, some energy is released and heats the air around it.
No reaction is 100 per cent efficient. Some amount of energy is always lost to heat. Moreover, it is impossible for heat to flow from a cold object to a hot one without work, as this would go against what is natural; heat flowing from hot to cold.
Enthalpy is a measure of heat in a system. It depends on the amount of internal energy, the pressure and volume of a system. If you have more of a substance the enthalpy increases.
Entropy is a measure of random activity in a system at a specific time. Increase in temperature results in increase in entropy. Gases have more entropy than liquids and solids. A chemical reaction that produces gases increases the entropy of the system.