It is a guitar capo.
It is for changing the pitch of guitar strings. The capo is clamped onto the neck of the guitar at a particular fret. This makes the strings all have a higher sound when plucked. The guitarist can now easily play a different set of chords using the same pattern of left hand fingers.