Heat is a form of energy.
When heat is provided to any object, the molecules, and atoms of the object gain heat energy.
This energy results in an increase of kinetic energy of the molecules, which vibrate faster with more speed.
If more amount of heat is provided to the object, this results in the breaking of intermolecular forces, and the object changes its state(from solid to liquid).
Thus, objects when heated up gain energy which increases the internal energy of the object.