Remove any old caulk with a scraping tool and clean all caulked areas thoroughly with denatured alcohol and a rag.
Pour water in a bucket, add a few squirts of dish washing liquid and mix it up with a sponge. Wash the window gaps and the area around the window thoroughly to prevent dirt from getting into the caulk. Wait for the window area to dry completely before proceeding.
Put an open tube of caulk into a caulking gun. Hold the gun at a 45-degree angle then pull the trigger and move the caulk slowly along the window gap to fill it completely with caulk.
Inspect the caulk to ensure it is sticking to both sides of the gap. Smooth away any excess caulk with a putty knife before it dries.
Examine the caulk the next day to ensure that the gaps are completely filled. The caulk may have shrunk overnight. In this case, reapply caulk as needed.