Water-based, oil-based (alkyd) and shellac describe what a primer is made of, not what job it does. So start with the job, then pick a product whose label names your surface.
Stains: fix the leak, then use a stain blocker
For an old water stain on a ceiling or wall, stop the leak first. In its interior surface preparation FAQ, Sherwin-Williams says stain-blocking primer-sealers come in both alkyd and latex versions, and that the alkyd type usually seals water stains better because it contains no water that could re-wet the stain. It also warns that you may still see the stain through the primer; the primer's job is to lock the stain in so it doesn't bleed into the topcoat. That faint shadow after one coat doesn't mean it failed.
Smoke, soot and pet stains are a separate case. Shellac-based blockers such as Sherwin-Williams' pigmented shellac aerosol primer are labeled for exactly those stains. Check that whatever you buy names your kind of stain and your surface.
If the stain is still growing or feels damp, it's a leak, not a paint problem. Call a plumber if there's a bathroom or pipe above it, or a roofer if it's under the roof. Our guide to leak repair covers what to check first.
Glossy trim, doors and cabinets: use a bonding primer
On slick surfaces the problem is adhesion, not color. For glossy interior doors and trim, the Sherwin-Williams FAQ recommends an adhesion primer, and says you still need to wash and clean the surface first. The product page for its Extreme Bond primer says sanding may not be necessary on most clean, paintable surfaces. That's a claim about one product, so read the label of whatever you buy rather than assuming no sanding for every bonding primer.
If you don't know what the old finish is, for example oil paint under latex, ask a painter to identify it and explain the prep before the whole room is coated.
Patched or bare drywall: use a drywall primer-sealer
Bare drywall soaks up paint unevenly, so the finish can look blotchy. A PVA primer-sealer is the usual fix. Sherwin-Williams says its PVA drywall primer is made for new bare drywall, gives a more uniform base for the topcoat, and can be recoated in one hour. That one-hour figure applies to that product only, so check the can for yours.
For a patch, make sure the primer's label covers the patching compound you used. If the patch still shows after painting, the cause may be texture or shape rather than primer; our article on why a drywall patch shows after painting walks through how to tell.
Before you sand anything in an older Philadelphia house
If the house was built before 1978, the old paint may contain lead, and sanding or scraping it can create dangerous lead dust. EPA's lead-safe renovation guidance recommends hiring a lead-safe certified contractor for renovation, repair or painting work in a pre-1978 home with lead-based paint. EPA's remodeling indoor air guidance also covers ventilation and emissions from paints and other materials.
In Philadelphia, the city's Lead and Healthy Homes Program offers information and referrals, and for eligible families a free home inspection in which a licensed lead inspector tests the painted surfaces. Tenants should report peeling or chipping paint to their landlord.
Questions to ask a painter
What problem does this primer solve on this wall: stain, adhesion or porous drywall?
Does the finish paint's maker allow skipping primer here?
Are you spot-priming the patches or priming the whole wall, and why?
If the house is pre-1978, are you lead-safe certified, and how will you handle sanding?
Before hiring, our checklist for hiring a home repair contractor in Philadelphia and Bucks County lists what to confirm.