Look to see if the window needs to be scraped, primed and painted or even replaced. If your window frames are rotting and need to be replaced, no amount of caulk will fix your problem.
Window caulk-able? Remove old caulk and paint from seams and cracks using a scraper, putty knife or utility knife. Get as close to the joint edges as possible during the removal process.