Ice, water and steam are the same molecules. What changes is how fast they move and how tightly they hold on to each other.
In the box below are a few hundred atoms that attract each other when they are close and push apart when they touch. The heater under the box sets the temperature: warmer means the atoms jiggle faster on average.