Trim molding should be painted in a logical order for a smooth finish with no brush marks. If you need to mask to get a straight line between trim molding and walls, see masking to paint trim molding for help.
Start painting trim molding at the top and work down. If you are painting a door frame for instance, do the top case molding and top of the jamb first, then paint down the two side moldings and insid the jambs to the floor.
When painting windows, doors or other large trim pieces, start in the center and work out. When you're painting a door, start with the center most parts like the middle stiles and rails and work out to the panels and outer stiles.
If you are painting a window, paint the sashes first; on the sashes paint the mullions first and work out to the case moldings. Start by painting the mullions around the glass panes and then paint the sash frames. Do the top sash first and then the bottom one. Next paint the casings starting with the top piece and following with the sides and finish the job by painting the sill.