All matter emits light, which is a type of electromagnetic radiation. The wavelength of this radiation depends on the object's temperature: higher temperature corresponds to a short wavelength while lower temperature means a longer wavelength. For example, think of the coils on a metal stove; When the stove is cold (off) the coils look black, but When you turn the stove on you begin to feel the coils giving off heat. If you turn the stove to its highest setting, the coils will begin to glow red. If you could set it any higher the coils would glow yellow, then white.
The atoms in ice are more densely packed and move less than the atoms in lava.
From our stove example, we can see that temperature and electromagnetic radiation are related, but what exactly is temperature? If one considers a sample of matter on the molecular scale, temperature is a measurement of the sample's internal energy: the random motion or excitement of particles comprising the sample. The particles in a system with high internal energy will be moving faster than the particles in a system with lower internal energy. The less internal energy there is in a system the lower the temperature; the greater the internal energy the higher the temperature. A sample of water, for example, exists in a solid state below 0° C. The constituent H2O molecules are densely packed and move very little. At higher temperatures the water sample transitions into liquid or gaseous forms in which the molecules are widely separated and rapidly moving.