Wash the area around the cracks with a degreasing cleaner or a mixture of equal parts water and vinegar. These solutions remove any dust or grime buildup on the surface.
Sand the cracked paint from the wall and baseboards gently with a fine grit sandpaper. Wrap the sandpaper around the eraser end of a pencil and use this to sand inside corners.
Examine the cracks to ensure that they go no deeper than the painted surface. Repair cracks in the wall around the baseboard by smoothing a thin coat of drywall patching compound over the crack with a putty knife, then allowing it to dry before repainting. Repair a crack where the baseboard meets the wall by squeezing a bead of latex caulk along the gap. Smooth the surface of the caulk with a wet fingertip.
Paint the wall with a latex primer. Primer isn't typically needed on wood baseboards, unless you are painting them a lighter color than they were previously.
Paint the wall with a latex paint in the desired color after the primer coat dries. Apply up to two coats of paint, if necessary. Use an angled brush to paint the tops of the baseboard and a standard brush for the front.