Temperature is that the degree of hotness or coldness of a body. When a hot body is kept in contact with a cold body, the cold body warms up and the hot body cools down. This means heat energy is transferred from a body to the cold body because of their different hotness (thermal state). 

"Thus the temperature is the thermal state of a body which determines the direction of heat flow when bodies are placed in thermal contact The body which loses heat in thermal contact is said to be at higher temperature whereas the body gains heat is said to be at lower temperature. The body which gains heat, warms up and its  temperature increases because of the heat energy added to it. Hence temperature is the effect of heat.

In molecular concept, temperature of a substance is the average kinetic energy of all molecules of the substance.

In thermal contact temperature of cold body goes on increasing and temperature of hot body goes on decreasing until they both have the same value of temperature. Hence temperature of a system which finally acquires the same value as all other systems placed in thermal contact.

As temperature determines the direction of heat flow, the body at higher temperature but having low amount of heat gives more severe pain of hotness than the body at low temperature but having high amount of heat. SI unit of temperature is Kelvin' (K) and CGS unit is degree Celsius ('C).