There are two objects having the same temperature. We bring them together and nothing happens. Their temperature does not change, because there is no transfer of energy. There is no transfer of heat.
On the other hand, when one of the bodies has a higher temperature, then the energy flows from the hotter to the colder body. We say that there is a transfer of heat.
In this sense, temperature is a number that we assign to a body to describe how much energy it has. Note that it is a measure of energy, not energy itself.
Heat is the change of thermal energy. In physics, you can have negative or positive heat depending on the directition it flies.