Good preparation is essential when preparing wood ready for painting or varnishing. No amount of paint will hide bad defects on the surface below.
Some older paints can contain Lead, read about Removing Lead Paint before you start.
If the paintwork is sound, even if if it is several layers thick then a quick preparation is all that is needed. If the original paint is oil-based, rub down with a medium-coarse abrasive paper wrapped around a wood block, wash down with a solution of sugar soap, allow to dry and you are ready to apply the first coat.
If the original paint is emulsion then a wash down with soapy water is all that is needed, allow to dry and you are ready to apply the first coat.
If the paintwork is peeling, pitted, badly chipped or crazed then the paint will have to be stripped to the bare wood, any damage needs to be repaired and smoothed before you are ready to repaint.