Thermal equilibrium is when two objects are at the same temperature.
Two objects at different temperatures will reach thermal equilibrium because heat will flow from high temperature to low temperature. For example a hot cup of coffee and a room.
This does not mean that they contain the same amount of energy. A rock thrown into the ocean will reach the same temperature as the surrounding water. Certainly the ocean has more thermal energy than the rock, but they have the same temperature.
Heat energy flows from high temperature to low. In the summer heat goes from outside where it is 95 to inside. In the winter heat flows from the warm house to the outside. It is possible to force heat to flow the wrong way. This is done by refrigerators and air conditioners, but it requires energy. has to be done to make the heat go from cold to hot. I like to compare this to rolling a ball uphill. The ball won’t go uphill by itself, but you can make it go uphill by doing work. Air conditioners and heat pumps make heat go “uphill”.