Answer: Atoms gain energy as a solid changes to a liguid
Explanation: In the image, we can see how a thing with a defined shape changes into something with an undefined shape, that can be liquid or gas, let's suppose that it is a liquid because it accumulates at the bottom.
Usually, as you heat a solid, it will reach his fusion point, which is the temperature at which the solid start to change his state from solid to liquid.
As the solid increases its temperature, the energy of the atoms increases (because heat is a form of energy).
Then as the solid changes to liquid, atoms gain energy, because their temperature must increase.
In the case of gas, the situation is the same, atoms gain energy as the solid changes to a gas.