What happens when a cold material interacts with hot material?

The heat from the hot material is transferred to the cold material. Given enough time, eventually the two materials will be the same temperature, and no more heat will be transferred between them.