If, at the end of a complete cycle, both the system and surroundings have been returned to their initial stateswithout any permanent change to either, the process is said to be reversible. Sometimes this is referred to as a quasi-static process.
At the end of a cycle, the system has been returned to its initial state, but the surroundings have not, and have experienced a permanent change.
What is the internal energy?
The internal energy, U, of a system is the sum of all forms of energy in the system.
A State Function
A state function depends only on the current state of a system. The change in a state funciton between two states is independent of the path between them. Internal energy is a state function; work and heat are path related functions.