For a system in contact with a reservoir with well-defined constant temperature $T$, its change in Helmholtz energy satisfies the following inequality:
$$\Delta F \le -W_{by}$$
where $W_{by}$ denotes the work done by the system.
I know that in thermal equilibrium, Helmholtz energy of the system is minimized. But I don’t understand what the system is doing to minimize its free energy.
Based on the inequality, the maximum work that can be done by the system is $-\Delta F$. I am not sure if it indicates that the system spontaneously do work to decrease its free energy.
As the system approaches thermal equilibrium, its entropy increases $\Delta S>0$ until it reaches its maximum. I wonder if the system also increases its internal energy $\Delta U>0$, so that at equilibrium $\Delta F=\Delta U-T\Delta S=0$? If so, what are possible reasons for the system to increase its internal energy?