In a cyclic process, the system starts and returns to the same thermodynamic state.
The net work involved is the enclosed area on the PV diagram. If the cycle goes clockwise, the system does work. A cyclic process is the underlying principle for an engine.
If the cycle goes counterclockwise, work is done on the system every cycle. An example of such a system is a refrigerator or air conditioner.
We'll show that this process does work. Because the process is cyclic, there is no change in internal energy after each cycle. Therefore the net work done in each cycle equals the heat added to the system. We now analyze each of the steps in the cycle.
Step 1  Isothermal expansion: The system does work W_{1} which equals the heat Q_{1} added to the system in the expansion, because the internal energy does not change.
Step 2  Isochoric process: The work done is W_{2} = 0. Heat Q_{2} is removed from the system because the temperature decreases from T_{1} to T_{2}.
Step 3  Isothermal compression: The work W_{3} done by the system is negative, but of smaller magnitude than W_{1} because the area under the PV curve is less than that in step 1. The internal energy is does not change, so the heat removed is Q_{3} = W_{3}.
Step 4  Isochoric process: The reverse of step 2. W_{4} = 0, while heat Q_{4} =  Q_{2} is added to the system.
Cycle Summary
Because W_{2} and W_{4} = 0, the net work done is W_{net} = W_{1} + W_{3}
Because Q_{2} + Q_{4} =0, the net heat added is Q_{net} = Q_{1} + Q_{3} = W_{net}
Net work done:
W_{1}  = nRT_{1} ln  ( 

) 
W_{3}  = nRT_{2} ln  ( 

) 
W_{net}  = nR (T_{1}  T_{2}) ln  ( 

) 