How Does the particles of the matter gain thermal and kinetic energy ?
The temperature of a body or a system of particles is the amount of kinetic energy associated with it. Thus, when thermal energy is provided to a body in form of heat it increases the kinetic energy of the constituent particles. This results in a velocity of the constituent particle (gas molecules or atoms or electrons) which is known as thermal velocity.