The correct answer is D. The particles gain both potential and kinetic energy.
As water is heated, its temperature increases, causing the kinetic energy of the particles to rise, which means they move faster. Additionally, as water transitions from liquid to steam, the particles gain potential energy during the phase change from liquid to gas because they are overcoming intermolecular forces. Thus, both kinetic and potential energies increase.