Thermodynamics, PV diagrams? My teacher told me that the total amount of work done on or by a gas can be represented by the area enclosed in the process in a PV diagram. This is only valid for non isothermic processes, right?
 A: There are several ways we can approach this, but I'll argue that the integral of the PV curve is a more general form of the force times distance concept of work:
$$ W = F \Delta x $$
This applies for pretty much any action over a distance.  If you compress a spring, lift a box, drive a car, the above equation applies to formalize the work done.  To generalize this, let's consider a piston, which is a cylinder that has one moving wall.  Force on the wall from the internal gas is pressure times area, which comes from the definition of pressure.  The volume is the cross-sectional area times the distance between walls, and the change in volume is $\Delta V = \Delta x \times A$.  Substitute these in our equation:
$$ W = F \Delta x = \left( P A \right) \left( \frac{\Delta V  }{A} \right) = P \Delta V $$
This has some major hand-waving, because the pressure changes as the position of the wall changes.  Of course, there is a simple remedy to the situation, which is to write it as an integral.
$$ W = \int_{1}^{2} P dV$$
I write it this way to indicate that there is a transition from state 1 to state 2.  Pressure depends on the volume in a non-trivial way.  To know exactly how pressure changes you need the thermodynamic specifiers mentioned in the comments - is it isothermal, isentropic, etc.  Assuming you know the amount of gas in the piston and that it remains constant, the pressure is then a function of both volume and temperature, and this is why the additional specifier is needed.
