What happens to has when it cools is ...
Step 1) They will start to form liquids, like condensation.
Step 2) As liquids cool, they will turn into solids.
Step 3) As solids cool, they become more stable and solid.
To get the best possible answer. (sorry if im wrong)
The law of conservation of matter states that matter cannot be created nor destroyed. It can only be transformed from one form to another. To state an example where this is shown, let's say a piece of paper is burning. Not having a scientific background, you would say that the matter is being destroyed. But in reality, the paper is simple being transformed to ash, carbon dioxide, and water vapor. Overall, the total mass would still remain the same.
Freezing.................