The transfer of heat will continue as long as there is a difference in temperature between the two locations. Once the two locations have reached the same temperature, thermal equilibrium is established and the heat transfer stops.
Heat is transferred from a warm body to a cooler body. The temperature of the warm body drops while the temperature of the cooler body rises. When the two temperatures are equal, thermal equilibrium is attained, and the heat transfer stops.