Temperature is defined as the average kinetic energy of a substance, and it is what determines whether an object is a solid or a liquid. When the temperature is low, the average kinetic energy of the substance is low, and there isn't much molecular motion. This causes molecules to "stick" together and be held in a rigid structure. However, when the temperature is higher, there is a greater amount of average kinetic energy in the substance, leading to greater molecular motion. The molecules are still held together by their respective bonds, but they are now far less rigid and can move to a greater degree. This is what causes their state to be altered.