Heat is energy - adding energy to particles changes their behaviour, ultimately changing their state.
Heat is a type of energy. When we add energy to particles, they get "excited". This results in an intensified motion - going faster and faster. In addition, it takes up more space.
At the same time, the particles' attraction becomes weaker. Eventually, the attraction is so weak and the molecules are so far apart ( and moving very fast), that matter's state changes.
Conversely, removing energy (freezing). When particles have less energy, it slows down and takes less space. If you get them cold enough, you can change their state.
Hope this helps :)