How does heat affect matter during change of state?
Changes the state of said matter.
When particles gain energy (they gain heat), they undergo a transformation in order to accommodate this.
When a particle gains energy, it gets excited. As a result, the atomic attraction becomes weaker and they break free from each other. This leads to the matter increasing in volume: solid -> liquid -> gas.
On the other hand, when a particle loses energy (gets colder), the attraction becomes stronger and they get together. This results in matter decreasing in volume: gas -> liquid -> solid.
Hope this helps :)