A primer prepares a particular surface for the selected finish. It may support adhesion, manage absorption, block a specified stain or inhibit corrosion. A product can combine roles, but none should be assumed from the word “primer”.
Start with the surface and the finish instructions. A sound compatible repaint may not need a separate primer; an unsuitable, damp or deeply crumbling substrate needs more than another coat.