That depends on if it is new or something that has been stained or painted before. if new, you will need to sand the wood, should remove any sharp edges so the paint has someplace to stick to. you then should use a bonding primer. When dry, sand and put the first coat on your woodwork. repeat for the second coat. I like to use 150 sand paper for the prep before priming and first coat, and 220 between the first and second coat.
If already painted, same process, but you will not need the bonding primer, but you could use a primer if the color is going to be a major change, such as from red to white.
If stained, use the same process as bare wood, but you will have to sand more so the primer will have something to grip to.
Hope this helps