What happens when two substances with different temperatures come into contact?

When two substances with different temperatures come into contact, heat transfer occurs between them. The heat energy flows from the substance with the higher temperature to the substance with the lower temperature. This process continues until both substances reach thermal equilibrium, which means they eventually have the same temperature. The heat transfer usually occurs through conduction, convection, or radiation, depending on the materials and conditions involved.