Determine what you are trying to accomplish with your primer. Some primers are better at covering stains, some dry faster and some are more durable. The right primer for you will depend on your specific project. Generally, you will choose between a water-based primer and an oil-based primer.
Choose an oil-based primer for better durability, weather resistance and deeper surface penetration. Oil-based primers can be used with any type of paint and are better at covering old stains. Use this type of primer especially if you are painting over a stained fence or trying to cover ugly wear marks. Oil-based primers create a smoother surface for your paint, but can take 8 to 24 hours to dry (which can slow the process of your project, especially if you want to do multiple coats).
Choose a water-based primer for easy clean up and a better gloss. These types of primer have better color retention and will not trap moisture within the wood fence. Water-based primers also dry much faster than oil-based, typically in one to six hours. However, a water-based primer should only be used with a water-based paint.
Make sure your primer is intended for exterior use and is specifically intended for wood surfaces. There are different primers for different surfaces (plastic, metal, wood, etc.), so your wood fence will need a wood primer.