In thermodynamics, temperature and thermal energy are closely related. The temperature refers to the average kinetic energy of the particles in a substance, while thermal energy refers to the total kinetic energy of the particles in a substance. When two objects at different temperatures come into contact heat flows from the hotter object to the cooler object. This transfer continues until both reach the same temperature which is thermal equilibrium. The amount of heat transferred in this process is faster, the higher their temperature difference. It is important to understant that thermal energy and temperature are not the same. For example, a cup of water at 20°C and a swimming pool filled with water at 20°C clearly have the same temperature but the swimming pool contains much more thermal energy due to its greater volume.