As the temperature decreases, the atoms lose energy. The atoms begin to move slower. They are held together by attractive forces, but are still able to slide past each other.
solid to liquid
liquid to solid
gas to liquid
gas to solid