Caulking is your best bet for windows in relatively good shape with cracks thinner than a pencil. There are many caulks to choose from. Adhesion to surfaces and flexibility are key to caulk's effectiveness at stopping leaks. Read labels carefully. Rope caulk should be used for windows and other places you will want to be able to open again come summertime.
Rope caulk is very inexpensive, easy to work with and only takes a few minutes to apply.
It is usually only good for one year, although you can try to save it by storing it in foil to be reused for one or two additional seasons. But once it hardens, you should discard it. A more permanent solution is to weatherstrip the windows. It still allows you to open windows year round, but it greatly helps to reduce leakage around the tops and sides of windows and doors. As with caulk, there are a variety of weatherstripping products to choose from.