The change in temperature is accompanied by the heat transfer, the heat is the form of energy transferred from one body to another. Heat is the energy in transit but a body has its own heat capacity.
Let \(Q\) denotes the quantity of heat. The change in temperature in a body of mass \(m\) is \(\Delta T\). It has been experimentally found that the quantity of heat is directly proportional to the mass \(m\) and the change in temperature \(\Delta T\), that is, \(Q \propto m\Delta T\). The quantity of heat if \(c\) is the proportionality constant is given by
\[Q = mc\Delta T \tag{1} \label{1}\]
where \(c\) is called specific heat which is
\[c = \frac{Q}{{m\Delta T}}\]
and can be defined as the amount of heat required to raise the temperature of \(1\text{Kg}\) material by \(1\text{K}\) (or \(1{{\kern 1pt} ^ \circ }{\rm{C}}\)). Its unit is \({\rm{J/(Kg}} \cdot {\rm{K)}}\). Note that the SI unit of the quantity of heat is \(J\) same as the unit of mechanical energy. Mechanical energy and heat energy both are the forms of energy which can be converted to each other; mechanical energy can be converted to heat energy and vice versa.
You'll often encounter another unit of the quantity of heat called Calorie abbreviated as \(\text{Cal}\). \(1\) Calorie is the amount of heat required to raise the temperature of \(1\text{g}\) of water from \(14.5{{\kern 1pt} ^ \circ }{\rm{C}}\) to \(15.5{{\kern 1pt} ^ \circ }{\rm{C}}\). Experiments have shown that
\[{\rm{1Cal}} = 4.186{\kern 1pt} {\rm{J}} \]
The Eq. \eqref{1} can also be expressed in terms of molar specific heat denoted by \(C\). If \(M\) is the molar mass of a material and \(n\) is the total number of moles, the total mass of the material is \(m = nM\) and
\[Q = nMc\Delta T = nC\Delta T \tag{2} \label{2}\]
where the product \(Mc\) is constant called molar specific heat \(C\) which is the amount of heat required to raise the temperature of one mole of the material by \(1\text{K}\) (or \(1{{\kern 1pt} ^ \circ }{\rm{C}}\)).