When the released energy is greater than the absorbed energy, or when the energy of the whole system decreases, this is an exothermic reaction. The exothermic reaction occurs because the energy initially concentrated in the system is more evenly distributed in the environment after the reaction. Chaos and entropy of this system increase. This is possible according to the second law of thermodynamics. Strictly speaking, it can easily happen spontaneously.
Then, the energy originally contained in the chemical bond is released into the surrounding atoms. When atoms gain energy, it means that the kinetic energy of atoms increases and the thermal motion of particles increases, which means that we feel the heat. Or electrons receive this energy. Just as the higher the height, the greater the gravitational potential energy. In the nucleus, if electrons want to jump to a higher energy level, they need to absorb energy and overcome electromagnetic interaction to work. So the energy released by chemical bonds becomes the potential energy of electrons. This process is called electron transition. According to the second law of thermodynamics, in short, entropy always increases.
In other words, energy tends to be evenly distributed rather than concentrated. So electrons with high potential energy will spontaneously jump to lower orbits. Energy is conserved, and this part of potential energy is converted into photons with certain energy. The frequency of light wave is given by E=h V(E energy h Planck constant v frequency). The photons released by uncountable atoms are finally transformed into macroscopic phenomena, that is, the light in the phenomenon of "fire" that we see, that is, "flame".