The document describes how to swap the values of two integer variables, num1 and num2, using a third temporary variable temp. Since directly swapping the values would lose the original value of num2, a third variable temp is used to hold the value of num2 while the value of num1 is moved to num2. Then the saved value from temp can be moved into num1, completing the swap.