The three common forms of matter on earth are solid, liquid, and gas. The form that any substance is in depends on the relative motion of the particles of the substance and the degree of attraction between the different molecules.
Kinetic molecular theory says that are constantly in motion unless the temperature is at absolute zero. This motion can be one of two kinds - either internal motion due to the vibration of the molecules and atoms of the substance - or translational meaning the individual atoms and/or molecules are free to move in relation to one another.
Let's start with a solid at relatively low temperature. A solid remains a solid because the forces of attraction within the solid are strong and motion between molecules is essentially zero.
Now start adding heat energy to the solid. As you do so the energy is absorbed and the internal vibrations of the solid increase, and the temperature of the solid increases. Temperature being a measure of the average kinetic energy of the solid. Depending on the solid, this can happen for a long time before any visible changes can be seen. Thus, if you heat a metal frying pan on a stove, it obviously gets hotter, but not hot enough for the molecules to start moving and melting.
Eventually, as you add more heat energy, the solid will reach a point where it starts turning into a liquid. This is called the melting point and is a physical characteristic of every pure substance. Now as you add more heat energy, something interesting happens. As long as the solid is melting, the temperature remains constant and does not begin rising again until all of the solid has changed into a liquid. In the liquid state the internal motion of the atoms and/or molecules has increased, the degree of attraction is less, and the atoms are able to move in realation to each other.
Now continue adding heat energy to the liquid, watching the temperature rise, until the temperature reaches the boiling point. When the boiling point is reached the atoms of the liquid are moving fast enough that the attraction between them is broken and they escape from the surface of the liquid into the air as a gas. This phase change again happens at a constant temperature until all of the liquid has been changed into a gas.
All of this can be shown on a graph of energy on the x-axis vs. temperature on the y-axis. If you start at the origin you have a solid and a sloping line upward as heat is added. At the melting point the line flattens, then rises sloping upward as the liquid is heated, flattens again as it changes phase from liquid to gas, then again slopes upward.