Heat (q) is energy that is transferred from one object to another because of a temperature difference between them.
Temperature is the average kinetic energy of the particles in a substance.
Temperature plays part in heat, and heat is dependent on temperature.