Ice, water and steam are the same stuff in three states. Heat makes the tiny bits move more: in ice they stay in place, in water they slide past each other, and in steam they fly apart. Changing state does not change what the stuff is.