Wood needs to be treated before you can paint it. More specifically the knots in wood need to be treated properly.
If you don't seal the knots in the wood, they will bleed through the paint or varnish and discolour it, which will ruin all your careful work. So before painting make sure to apply knotting solution to all the knots and blemishes in the wood. This can be bought at most hardware stores and usually costs about $10-12 for a small tin.