Using a Spectrum Analyzer to measure VSWR
I need to measure the VSWR of a coaxial wire that has a length of 100 metres and a load of 50 ohms
  ...
  what do I have to put in the green box?


The green box is the 50 ohm load you said you want to have on the end of your cable when you measure its VSWR.


  Why?


Because you said you want the VSWR of a cable with a 50 ohm load, not the VSWR of a cable with an open or short load.


  The coupler is a unidirectional, isn't it? 


We usually call it a directional coupler. 

The port connected to the input of the spectrum analyzer is the one that gets most of the energy from the signal returning from the device under test (DUT).

Internally there is another port that gets mostly energy coupled from the generator. But this port is already terminated with 50 ohms inside the coupler device so you see the coupler as a 3-port device rather than the 4-port device it actually is.


  I understand how a coupler works but I don't know how the tracking generator and the coupler work together.


The tracking generator generates a signal at the same frequency that the spectrum analyzer is measuring at any given moment (it tracks the spectrum analyzer measurement).

So the generator sends a signal out to the DUT. The reflection from the DUT is coupled by the coupler to the spectrum analyzer input and its power is measured.

If you know the power sent by the generator (you'll have to do another measurement to find this) and the coupling ratio of the coupler (yet another calibration measurement), then you know the reflection coefficient (\$\Gamma\$) of the DUT.

And from \$\Gamma\$ you can find the VSWR.

Since the tracking generator and spectrum analyzer sweep their operating frequency together, you can use one sweep of the spectrum analyzer (and some post-processing) to measure the VSWR of the DUT as a function of frequency.

Edit


  the 50ohms is the characteristic impedance of the coaxial cable, not the load. SOrry.


Then how you should terminate it depends what you want to know about the cable.

If you want to know how well matched it is to 50 ohms, use a (very accurate) 50 ohm load.

If you want to know how long it is, or what's its attenuation, then use a high-reflection load. A well-made short will probably provide slightly better accuracy for these measurements than just leaving the cable end open.