Temperature is the measurement of the average amount of particles in a solid, liquid or gas. Thermal energy is the total energy in a set amount of solid, liquid or gas.
They are similar because they are both about particle theory. Particle theory is a theory about solid, liquid or gas that every particle is always in motion. They are different because temperature is the "measurement", which is shown as numbers, of the particles in a solid, liquid or gas, but the thermal energy is the "total energy" in a set amount of solid, liquid or gas.