So,
Let me upload an image that represents the situation first:
As you can see, the water molecules change a solid into a liquid or gas by changing its temperature. This is known as changing its state. Water is a liquid at room temperature, but becomes a solid (called ice) if it is cooled down. The same water turns into a gas (called water vapor) if it is heated up.
The water molecules are too close between each other when they form a solid. They are a little bit separated when they form the liquid state, and they are completely scattered when they form a gas.