In thermodynamics, heat is the sum of a system’s molecular kinetic energy (arising from particle motion) and its potential energy (stored in its molecular bonds). Heat can be measured in joules, calories, or BTUs.
The relationship between heat and temperature is analogous to the relationship between mass and density. A frozen lake (with many slow-moving molecules) contains more heat (and mass) than a hot cup of coffee (with relatively few, fast-moving molecules), but the temperature (and coincidentally, because ice floats, the density) of the coffee is higher.
Under most circumstances, adding heat to a system increases the kinetic energy of its molecules, thereby increasing its temperature. However, when a substance undergoes a phase change (from solid to liquid, or from liquid to gas), the temperature remains constant while the added heat is used to break the molecular bonds.