That is called a
boom VANG. It is used to control the vertical angle of the boom while you use your mainsheet to control the horizontal angle. On boats without a vang...the mainsheet does double duty and is less effective at controlling sail twist and loss of power.