The law of conservation of energy tells you that energy can change, but it can neither be created nor destroyed.
Heat energy flow problems are straightforward when you remember that heat energy never just disappears; you can always account for its location and direction.
Heat energy, or thermal energy, is composed of kinetic energy and potential energy, although you can only 'feel' the kinetic energy; an increase in kinetic energy as an increase in temperature.
The potential energy component of heat energy flow becomes evident in the positioning and bonding of atoms or molecules. Potential energy is also called chemical energy. High chemical energy of a bond means that the bond is strong; it is difficult to break, but once it is broken, there is often a release of large amounts of energy.
System vs Surroundings
Thermochemistry has two important features: the system and the surroundings. System refers to the bonds that are involved in a reaction, and surroundings are everything outside of the system. Surroundings could refer to the universe, or could be restricted to the inside of a calorimeter.