In an ecosystem, when energy is given off as heat, does it change forms from chemical substances to heat? Or is it something different?

that is the usual way

Sometimes mechanical (rubbing) , sometimes chemical (reacting with O2), etc. The one thing you can count on is that whatever happens, it will end up losing heat to the environment :)

In an ecosystem, when energy is given off as heat, it is not a change from one form of energy to another. Heat itself is a form of energy.

To understand how energy is transformed and transferred in an ecosystem, we need to consider the concept of energy flow. Energy enters an ecosystem from the sun as light energy. This energy is captured by plants through photosynthesis and converted into chemical energy in the form of glucose.

When animals consume these plants, they obtain the chemical energy stored in the glucose through digestion. This chemical energy is then used by the animals for various activities such as movement, growth, and reproduction. However, not all of this chemical energy can be utilized by the animals, and a significant portion is converted into heat energy as a result of metabolic processes.

So, when energy is given off as heat in an ecosystem, it is the result of metabolic activities and the conversion of chemical energy to heat energy by organisms. This heat energy is then dissipated into the environment, usually by conduction, convection, or radiation. It's important to note that this heat energy is not a separate form of energy but rather a form of energy transfer resulting from the metabolic processes occurring in living organisms.