Temperature is a measure of the average kinetic engery of the surrounding molecules. The kinetic energy is simply the energy of motion that the molecules acquire from their environment, which can be attributed to the amount of heat in the area. When the temperature is increased, the amount of heat is effectively raised; the heat is absorbed by the molecules, which causes them to vibrate. In whatever state (solid,liquid, or gas) the molecules are in, addition of heat will cause them to move to a more energetic state -- that's why when you heat ice, you get water, when you heat water, you get steam. In each case, the space between the molecules is increased as heat is added, or the temperature is increased.