If people previously smoked in the house the nicotine can keep coming through for years <bitter experience> We used a special bottom coat, possibly oil based sealant type, then painted white over the top.
It takes a while for the stain to seep through so if they'd painted it fresh before you moved in you wouldn't have noticed. Our doors and skirtings are ok now but we get patches on the walls - above the windows for example where it looks like it's dripping through but is solid and dry - totally foul. Only alternative is to sand back to wood I suppose? Apparently we need to replaster to get ris of ours, it's too deeply ingrained in the walls.
When I used eggshell it looked like I'd given up after the undercoat. So I redid the kitchen woodwork in gloss white and it's already yellowing after only two months (Dulux again!) Will try that everwhite stuff next time.