Temperature is the average heat of the substance in question. It is also the average thermal energy. Not every molecule within the substance will have the exact same amount of energy. Saying that the temperature is something like 50 degrees Celsius is averaging out all of the molecule's energies into one number. Heat is the energy of each individual molecule added up together, so it can be varied as all molecules do not move at same amount of energy. Therefore temperature is the average of energy of the molecules while heat is the total energy of molecules.