The atoms in a sample are close together but can slide past one another. As the atoms lose energy, they move slower. The atoms become locked in place because of attractive forces between them.
Which change of state is taking place?
gas to solid
gas to liquid
liquid to solid
solid to liquid