That depends on how you get there. In contrast, what is the increase in potential energy is independent of the path, and so is an exact differential. The next concept is heat. Consider a container with rigid walls. The system initially has ice and a liquid water.
Time goes by and the system now has only liquid water.
The change in internal energy must have been due solely to heat interactions. Now consider the same system, but with adiabatic walls. Now consider a gas inside a cylinder, adiabatic walls, massless, frictionless piston. You put heat into the system and get work out. The amount of heat and work depend on factors such as friction, etc.