In addition to questions about how this could happen, you know the mass remains the same because if the mass were increasing along with the volume the density would remain the same. Thus less heat is required to heat a substance with a low specific heat and more for a substance with a high specific heat. Specific heat is defined as the amount of heat needed to increase the temperature of one gram of a substance one degree Celsius. Thus less heat is required to heat a substance with a low specific heat and more for a substance with a high specific heat. Thus the substance with the lower specific heat is going to have a higher temperature from the same heating.
Temperature is the average kinetic energy of the molecules of a substance.
Since heat can only be measured as it is leaves or enters a substance, you might ask yourself if a large and a small container of water with the same temperature would melt the same number of ice cubes. The large container of water will melt more, of course, so you know it contains a different amount of heat. Heat tends to move from a region with higher temperature to a region with a lower temperature just as a ball tends to roll downhill. You must give a ball more energy to move it uphill and more energy is required to pump heat from a cooler region to a warmer one. Any of these can be used to measure heat.