When ice (solid state) is heated, it melts and changes to water (liquid state). When water is boiled, it is converted to steam (gaseous state). The process can be reversed upon cooling. This justifies that these are the states of a substance. In fact all the three states are chemically the same with the formula `H_(2)O`.