Heat flows from the body at higher temperature to the one at lower temperature. The flow stops when the temperature will be equal and the two bodies are then in thermal equilibrium. Heat is energy that flows between a system and its environment by virtue of a temperature difference between them.
Heat is a form of energy but it comes inti picture when energy is being transferred from one state to another. Assume we are at an initial stat “A” and want to go to a final state “B”. We can do that by various processes and heat energy released or absorbed in all the processes is different and heat does not depend on the state of system.
When a cold body ‘A’ is placed in contact with a hot body ‘B’ something is transferred from hot body ‘B’ to the cold body ‘A’ which results in a rise in temperature of the cold body. This transference stops when the two have acquired same temperature. This indicates that only a part of energy of ‘B’ is transferred to ‘A’. This part is called heat. Heat is that part of internal energy which is transferred from one body to another an account of the temperature difference.
By convention, heat is given to a body is taken as positive while that taken out of the body is taken as negative.
Heat is transferred by conduction or radiation:
Transfer of thermal energy can be accomplished by bringing two bodies into physical contact. For example: The kettle on top of the stove or through an electric heating element inside the kettle.
Another mechanism of thermal energy transfer is by radiation. A hot object will convey energy to anybody in sight of it via electromagnetic radiation in the infrared part of the spectrum.