The first law of thermodynamics states that energy can be transferred or transformed, but cannot be created or destroyed.
Both heat and work refer to processes by which energy is transferred to or from a substance.