What are the similarities and differences between temperature and thermal energy?
Both are different things. No similarities as such.
Only similarities would be that both of them are physical quantities, both of them are Thermodynamic state functions etc.
Well, both of them are completely different.
Thermal energy is energy. Simply energy. That is the energy that is transferred from one system to another without mechanical means. That's the energy that makes molecules in a fluid move randomly. That's the kind off energy one uses to run a Carnot's engine.
Coming to temperature. It is the measure of how hot a system is. Not that how much thermal energy the system has.
There can be two systems with same temperature but, different thermal energies.
The temperature is that variable which determines the property of thermal equilibrium. If temperature of two bodies/systems are equal there can be no spontaneous transfer of heat from one body to another even if they are connected by conducting means.