how to paint moldings and millwork

Large gaps like this one should be filled with spackling instead of caulk.