Kenny...welcome! A preventer is generally used on a broad or beam reach when the winds are light and flukey and when there is some danger that the boom could gybe and swing rapidly over to the other side of the boat...beheading people and causing gear damage. Since this can really happen any time the helmsman fails to pay attention to his course or the wind on any tack...many cruisers will use one full time. In it's simplest form, a prventer is simply a line with one end tied aroung the boom and another end tied to the rail closest to the boom. This rope prevents the boom from moving back across the boat. More commonly, preventers are rigged with multipart tackle and shackles for easy adjustment and use.
There are more complex but better ways to rig a preventer and there are other products that work like a preventer but require little attention and lots more $$.
I am not very good at drawing so I will leave it at that for now! Perhaps some others ave a good illustration. I particularly like the preventers that are rigged from the boom to a sheave on the bow of the boat and then run back to the cockpit winch for easy and quick adjustment.
No longer posting. Reach me by PM!