The study of energy and its interconversions . The Law of Conservation of Energy states that energy can be converted from one form to another, but neither be created nor destroyed. The energy of the universe is constant. Temperature is an index of randomness of particles, amount of kinetic energy.
Heat is the transfer of energy due to differences in temperature.
Only present state matters. Not the past where it came from. Therefore going from one state function to another state function is independent of the pathway. Energy is a state function, but heat and work are not state functions. Heat is released from the system.