The conservation of energy means that, assuming no energy is lost to the environment, any energy transferred to a material will be distributed between the chemical store and the thermal store of the internal energy
Whether the energy breaks bonds, increases the speed of the particles to stretch bonds, or just increases the speed of the particles depends on the temperature and state of the material
When a solid turns straight into a gas on heating, without becoming a liquid first - or when a gas turns straight into a solid, without becoming a liquid
During changes of state, particles gain energy, which is used to break some of the bonds between particles and overcome the remaining forces of attraction between particles