The part of the graph which is marked by 2nd and 4th boxes are the regions where the substance gains potential energy.
Step-by-step explanation:
Potential energy in the matter is stored in form of chemical energy in the chemical bonds. At this point, the temperature of the substance doesn't rise. But when the temperature rises, actually the kinetic energy of the substance rise, because of the molecular vibration.
In the graph, the line marks a distinct pattern where the temperature rises at certain places, and in certain places, it's still, even if the energy is supplied. So here in the parts of graph where it shows a horizontal curve, the potential energy of the matter rise.