There is a direct relationship between temperature and kinetic energy. Temperature is the measurement of the average kinetic energy of the particles that make up a substance. Kinetic energy is the energy of motion. Thus, an increase in kinetic energy implies that the average speed of the particles of a substance also increases. Likewise, a decrease in kinetic energy implies that the average speed of the particles within a substance also decreases.
Temperature and kinetic energy are related to phase changes.
As particles increase in temperature and move faster, the intermolecular forces between the particles are eventually broken. Thus, the particles are able to move apart from one another. As this occurs, the volume of the substance increases. The increased movement of the particles allows to particles to flow past one another. This eventually results in an indefinite shape of the substance. This is how sublimation, melting, and evaporation occur.
The opposite is also true. As particles decrease in temperature and move slower, intermolecular forces between the particles are able to attract one another. The particles come closer together and the volume decreases. The slowed movement of the particle, coupled with the decreased volume, results in a more definite shape of the substance. This is how deposition, freezing, and condensation occur.