Sand existing moldings with 150-grit sandpaper. Previously painted trim and finished wood trim is typically glossy. If you try to paint over this slick finish, the paint won't cover well.
Wash existing trim with soap, water and a sponge. Old moldings can get dirty over time, and dirt prevents good paint adhesion.
Dry the moldings with a clean towel.
Stick painter's tape to nearby wall surfaces. Tape protects the walls from accidental brushstrokes.
Brush primer onto the moldings using a foam brush. For wooden trim, brush against the grain to help the primer seep into the wood's pores. Brushing against the grain provides better coverage, but it often creates more visible brushstrokes if you don't use a foam brush. For vinyl or other materials, brush lengthwise: horizontally for floor and ceiling moldings and vertically for other trim.
Paint the moldings with oil-based, high-gloss paint after the primer dries. Use a foam brush to limit visible brush strokes. Paint lengthwise for even coverage.
Remove the painter's tape once the paint dries.