As we said in the introduction, there are two ways in which we can change the Internal energy. They are work and heat. So,

ΔU = q + w

where q is the heat supplied to the system and where w is the work done on the system.

This is the first law of thermodynamics.

The change in internal energy of the system is the sum of the heat supplied to the system and the work done on the system. Thus if the system is in an adiabatic container (ie no heat can be supplied to system from the surroundings), the change in internal energy of the system is the same as the work done on the system.

Conversely, if the system is in a fixed volume, with no other way of doing work (like a battery), then the change in internal energy is the same as the heat supplied to the system. This is quite useful since it is the basis of finding how the internal energy of a substance changes with temperature: 

Since ΔU = q + w, and w = 0, then ΔU = q.As we heat the water bath, heat is supplied to the system.

Unsurprisingly therefore, the internal energy changes and we can conclude that internal energy will change with the temperature. This introduces the heat capacity at constant volume or Cv.

It is normally more useful to look at the molar heat capacity, (ie: the heat capacity per mole) as this quantity may be compared between different substances. It is given the symbol Cvm.