Figuring which primer to use depends on the topside paint you're using, the substrate material, and, sometimes, the condition of that substrate. At the end of the day, it's always best to check with the topside paint’s manufacturer as to which primer should be used. That being said, some paint manufacturers do not always require a primer, so always read carefully, because you may be able to save yourself a couple of steps.
In the marine world, priming for wood or fiberglass is the most common application. Most 1-part topside paints will have a recommended, general-purpose 1-part primer that is commonly used when painting over wood, fiberglass, gelcoat, or on a previously painted surface. These primers usually do not have the corrosion protection or bonding properties that metals will require. One-part paints can also go over 2-part epoxy primers in most cases, but this is commonly when the substrate is metal, or requires a 2-part primer. Not all 1-part topside paints require primer over bare fiberglass or over previous paint in good condition.
Two-part topside paints commonly require a proprietary 2-part epoxy primer. This type of primer is designed for sandability, great bonding strength, and for giving the paint an inert surface to adhere to. Epoxy primers will work great on fiberglass, gelcoat, wood, and some properly prepared or etched metals. It is not very common to see a 2-part paint that does not require priming.
Depending on the paint, aluminum may require a specialty epoxy primer regardless of what goes over it. Some paints are designed to be applied directly to aluminum, but read the directions very carefully and make sure the paint fits the intended application. Aluminum must be etched first to prepare the metal to accept a coating. Etching is usually done using a specialized aluminum etch wash. The next step is to apply a chromated epoxy primer, which has anti-corrosive properties and is designed to bond very well to the aluminum. A chromated primer provides the best bonding surface for the paint, and will prevent the aluminum from corroding.
No matter which topside paint you choose and which substrate you apply it to, if you're ever unsure which primer to use, consult the paint instructions for recommendations. For complex substrates such as metals, consult the paint manufacturer.