A primer is a paint or coating applied directly to a surface to serve as an undercoat for other paints. In principle, any paint could be used as primer, but specially prepared compounds typically do the job much better.
Many surfaces aren't quite ready to serve as the base for a single coat of oil-based or latex paint. They may soak up too much paint, or be uneven. They may be discolored. They may have chemical or physical properties that make applying a single, even coat nearly impossible.
Primers solve all those problems and more.
Primers apply a coat directly to the surface allowing a top coat to stick better. Without one, it might require several coats to produce the same result. Since primer is generally much less expensive than final-coat paints, that can substantially raise the total cost of materials. With a primer, only one coat of the final type is needed, resulting in an overall cost reduction.
A good primer will smooth out rough surfaces. Some walls, obviously, may be too pitted, requiring putty or other preparation. But a wall that is simply rough can often be made to appear smooth with a proper primer.
The effect is the result of both thickness and color. A thick primer helps fill in the low, broad valleys in a wall surface. At the same time, the color (usually a dull white or gray) helps mask any highlights, making the wall appear smoother even when it's not.
Primer helps even out the final color in another way, too. The amount of paint soaked up, surface discolorations and other defects can cause a final coat to have a slightly different shade from one area to the next.
By giving the top coat paint something to cling to other than the bare surface, the final coat applies evenly. That results in a smoother looking wall or ceiling. Thus, light reflects evenly off the surface across the entire area. The eye sees that as a uniform shade. Even the same color can appear differently when shadows and other reflection effects occur.
Discolorations can occur because of weather, smoke, smudges and a hundred other causes. Cleaning a wall during preparation can only go so far. A primer can create a flat, even color that masks those problems. It provides a uniform starting point to which to apply the final paint. That results in a more uniform final result.
Primer is designed to dry quickly, so the job isn't delayed much beyond the time it takes to apply. In many cases, a large wall section can be primed, then the next. The first will dry while the second section is being done. The first can then be painted while the second section is drying. That keeps the work going smoothly.
Latex primer is odor-free, dries fast and is easy to clean up. That makes it an excellent base to lay down on those surfaces that need a little more preparation before final painting.