The internal energy $$(U)$$ of a system is the sum of the total energy of all the particles in the system.
Each particle in a system has an amount of kinetic energy due to its motion.
Each particle also has some potential energy due to its chemical bonds and intermolecular forces.
When an object is heated the particles in the system move faster. The random kinetic energy of the particles is increased. The potential energy of the particles stays constant.
This leads to an overall increase in the internal energy.
The internal energy of a body therefore depends on the temperature and the number of particles.