Step-by-step explanation:
Because heat is a form of energy, when heat is added to an object, it gives the molecules in that object more energy, allowing them to move around more freely.
The molecules in a solid are largely stationary, the molecules in a solid move around a bit more (this is why you can 'pour' liquid and not solids), and the molecules in a gas move about a lot.
Since heat can make an object's molecules move about more freely, this can mean that adding heat can change matter's physcial state: heat can turn some solids into liquid, and some liquids into gas. Think of ice melting (heat turning solid to liquid) or getting steam from boiled water (heat turning liquid to gas).
Similarly, removing heat from an object will remove the molecules energy and could cause the object to change its physical state as a result: removing heat can turn some liquid into solids, and some gases into liquid. Think of freezing water to get ice (lack of heat turning liquid to solid), or condensation on the mirror after showering (lack of heat on the mirror turning the shower steam (gas) into liquid)
Let me know if my explanation is not clear/ if you have any questions
Hope this helps :)