So the first law for an system where we don't have mass flows in or out ( a closed system ), is
$Q + W = \Delta U$
Where $Q$ is your net heat added, and $W$ is your net work added, and $U$ is your net internal energy change: internal energy being like the sum of all the different kinetic energies of the molecules. This is why when we add heat, the internal energy goes up, and when we add work the internal energy goes up.
This means, as the system has been defined as thermally isolated, it is therefore adiabatic ($Q = 0$) and the equation becomes
$W = \Delta U$
I think your confusion lies in the definition of a state function:
The definition of a state function is one that it always the same when we are at a particular state (state: a system where we've set the pressure, temperature, volume to specific values etc), no matter how we got there. If you've done $PV$ diagrams (pressure and volume are state variables) a state variable is one defined at a specific point on the $PV$ diagram, no matter how you got there, and no matter how many times you go away and come back, the state at that point must be the same. Therefore when we say $U$ is a state variable, we're saying $U$ is defined by the state, not by the process, and therefore does not depend on the path. That's why the $\Delta s$ are in the equation
If it's still confusing, I'd try KhanAcademy, he's got some awesome videos on this that are much better explained than what I've written