Heat and work are equivalent in the sense that the change of the system is exactly the same whether you transfer heat energy to it or do an equal amount of work on it. Adding energy to the system, or removing it, changes the system’s thermal energy.
What happens to a system when you change its thermal energy? In this section we’ll consider two distinct possibilities:
The temperature of the system changes.
The system undergoes a phase change, such as melting or freezing.