The diagram shows changes of state between solid, liquid, and gas. The atoms of a substance gain energy during a change of state. Before the change, the atoms are close together and cannot slide past one another. After the change, the substance can fill its container.