When things move, potential energy turns into Kinetic energy, right? Then how does Kinetic energy convert to thermal energy?
"Thermal energy" is just kinetic energy.
When people talk about temperature, a typically good (but largely classical) idea is that tenperature is a measure of the average kinetic energy of the particles. When people talk about an increase or decrease of thermal energy, they usually mean something has gotten hotter or colder. This suggests that thermal energy is really just kinetic energy.
Usually, when photons interact with the material, three things can happen:
elastic scattering (mirror on the surface), when the photon keeps its energy and changes the angle
inelastic scattering, when the photon gives part of its energy to the atom and changes the angle
absorption, when the photon gives all its energy to the atom
In your case, usually higher energy photons, that go deeper into the material, will elastically scatter on the atoms. In this case, the photon gives part of its energy to the atom or molecule and changes the angle.
A temperature of the material is the vibrational energy of the molecules in the lattice structure. Now when the photon elastically scatters off the molecules in the lattice, part of the photon's energy is transformed into the vibrational energy of the atoms or molecules in the lattice, thus heating up the material (thermal energy in your case).
Of course, on the surface, absorption can heat up the surface of the material too.
For moving (macroscopic) objects, kinetic energy gets turned into thermal energy by friction. This can be mechanical friction (machine parts sliding against one another) or fluid friction (water or air being pushed aside as the object moves through it). In any case, the moving object gradually slows down under the action of the friction force until it comes to a stop. At that point, all its kinetic energy has been converted into heat.