Heat transfer between a system and its surroundings occurs when:
The text states: '...when the temperature of body... and its surrounding medium are different, heat transfer takes place between the system and the surrounding medium, until the body and the surrounding medium are at the same temperature.'