The Cooling Curve

Figure below shows the change of the temperature when a gas is cooled to become solid.

Q & A

Q: Why the temperature remained unchanged from Q-R and S-T?

A:
The temperature remains unchanged because the heat released during the formation of the intermolecular forces compensates the heat losses to the surrounding.

Q & A

Q: Why the temperature remained unchanged from U-V?

A:
Because the temperature of the solid has reached the temperature of the surrounding.