In the following sequence of pictorials, some of the principles of the First Law of Thermodynamics will be illustrated.  The internal energy, with the symbol E (U in some texts), of the insides of a system, here a tea pot, may be increased by two means, either by doing work on the tea pot or by adding heat to the tea pot.  In this case, heat is being added.   The internal energy is increased due to the formula:
        DE = q + w     where q is the heat added and w is the work done on the tea pot.
 
 

tea pot before heating                                            tea pot being heated and E is increasing
  Start adding heat 
              Internal energy is E1                                   Internal energy is E so that E2 > E1
 

     Input of q raises E internal, turbulence is present 
                                                                                  Internal energy is E and E >   E2

Turning off heat and isolating the system - 
                                                                     Internal energy is E   and  E =  E3
 

The system is allowed to settle isolated 
                                                                  Internal energy is E5 and  E5 = E4