The key to caulking is the size of the hole on the caulking tube nozzle. The opening should be the same size as the gap your are caulking. Start cutting the end of the tube a little at a time until you get the hole just right. Be sure to purchase the correct caulk. It should be siliconized acrylic latex caulk that is paintable.
To caulk, place the caulk gun nozzle right in the crack and gently start to squeeze the trigger. Don't over caulk. Just enough to cover the gap. Once the gap is filled, use your finger to smooth the caulk around the crack. Then take a sponge, with very little water in it, and wipe down the caulk to finish smoothing. Now, you are ready to paint that area. This will make a bid difference in your paint project.