Temperature measures how energetically a substance's particles are moving on average, and heat is the energy that flows between two objects because of a temperature difference between them. Thermal equilibrium is the state two objects in physical contact eventually reach once that net heat flow stops entirely, and it happens for a genuinely simple reason: heat always flows from the hotter object to the cooler one, never the reverse, until both sides reach exactly the same temperature and there's no longer any temperature difference left to drive further flow.
Heat flow is a one-way process that stops exactly when temperatures equalise
Left in contact, a hot object and a cold object exchange energy through their particles' collisions at the boundary between them, with faster-moving hot particles transferring energy to slower-moving cold particles considerably more often than the reverse happens. This one-way net transfer continues, gradually cooling the hot object and warming the cold one, right up until both objects' average particle energy, and so their temperature, becomes equal, at which point collisions still happen but energy transfer in each direction balances out exactly, and the net heat flow that defines thermal equilibrium reaches zero.
The zeroth law makes this equalising tendency mathematically rigorous
The zeroth law of thermodynamics formalises this everyday observation into a rigorous physical principle: if object A is in thermal equilibrium with object B, and object B is in thermal equilibrium with object C, then A and C must also be in thermal equilibrium with each other, even without ever being placed in direct contact. This transitive property is exactly what makes the whole concept of a shared temperature scale meaningful in the first place, since it guarantees that "having the same temperature" behaves consistently across any number of objects, and it's precisely why a thermometer, itself just another object that reaches thermal equilibrium with whatever it touches, can be trusted to give a genuinely consistent reading.
What we're still unsure about
That heat flows one-way from hotter to cooler objects until temperatures equalise, and that the zeroth law makes this a rigorous, transitive relationship, are well established, foundational principles of thermodynamics, confirmed through more than two centuries of consistent experimental observation. What's more genuinely a subtler question is exactly how quickly two given objects actually reach thermal equilibrium in practice, since the rate of approach depends on the specific materials involved, their surface contact and the surrounding environment in ways that are much harder to predict precisely than the simple fact that equilibrium will eventually be reached, and engineers continue to rely on measurement and empirical modelling rather than a single universal formula to predict exactly how fast any two particular objects will equalise.
This sits inside Temperature, Heat & Thermal Equilibrium, one of seven topics in Thermodynamics, one of five domains in Physics, one of seventeen subjects the app can quiz you on.