If it is a small (about 12-inch long) cable with a clip that is attached to the backstay, it's called a pigtail. It's meant to hold the boom out of the cockpit when not sailing. Detach it BEFORE raising the mainsail and reattach it AFTER dropping the main.
My favorite trick is to forget to unclip before raising the main. I've done it more than once... Finally learned my lesson on a windy day when the main went up, I released the mainsheet as the sail filled, but the boom didn't move because it was still clipped to the pigtail. Put the rail in the water almost immediately!!! Rookie move!!! Enough said.