Energy is the ability of a system to do work and the change of energy, while heat is the energy being transferred.
Heat energy is the result of the movement of tiny particles called atoms, molecules or ions in solids, liquids and gases. Heat energy can be transferred from one object to another. The transfer or flow due to the difference in temperature between the two objects is called heat. The biggest example of heat energy in our solar system is the sun itself. The sun radiates heat to warm us up on the planet earth. When the burner of a stovetop is boiling, it is a source of heat energy. Automobile fuels such as gasoline are sources of heat energy, as is the hot engine of a race car or a school bus.
In physics, energy is the quantitative property that must be transferred to an object to perform work on, or to heat, the object. Energy is a conserved quantity; the law of conservation of energy states that energy can be converted in form, but not created or destroyed. Energy, in physics, the capacity for doing work. It may exist in potential, kinetic, thermal, electrical, chemical, nuclear, or other various forms. After it has been transferred, energy is always designated according to its nature.