Open a tube of painter's caulk by cutting off the tip of the tube at an angle, 1/8 to 1/4 inch from the end of the tip, using a utility knife. Do not cut the tip off any farther back from the tip or the bead will be too big. Insert the tube into a caulk gun, tip down.
Use a 4-foot step ladder to reach the molding. Move the ladder to where the crack is and set up the ladder according to its safety instructions. Gently squeeze the trigger of the caulk gun until caulk comes out to get the caulk moving. Hold the tip of the tube up to the molding where the crack begins and squeeze the caulk over the crack. Work in 1-foot sections when doing long cracks, such as where the molding meets the ceiling or the crack between the molding and wall.
Run the tip of your finger along the crack to push the caulk into the crack, which will also smooth the caulk. Wipe excess caulk onto a rag. Use a damp cloth to wipe away caulk on the wall or ceiling.
Apply painter's tape along the top and bottom sides of the molding to prevent paint from getting onto the wall or ceiling. Go around the entire room, taping above and below the molding on every wall in the room, not only where repairs were made.
Lay down painter's tarps to protect the floor below. Fill a small paint tray with the paint you have chosen, latex or oil. Move the ladder into position where you will begin painting. Carefully set the paint tray on the top of the ladder. Use a small paintbrush or small roller to apply the first coat. Move the ladder as you go along, painting the molding on each wall. Allow the first coat of paint to dry one hour and apply a second if desired.
Remove all painter's tape by peeling back an end and gently pulling the tape off the wall. Avoid pulling the tape off too fast as it may damage the paint job. Do not wait until the paint is fully dry to remove the tape as doing so can peel the paint from the molding.