Remove the trim or window stop that holds the bottom sash in place. This will be the inside window, as sash windows often come in pairs with a top and bottom piece. Take a thin and flat prybar and insert the flat end underneath the window stop by tapping lightly on the opposite end of the tool with the hammer. Be sure to save the trim once it is removed. Now the bottom of the unit should swing away from the window, but it will not come free because it is attached to ropes (called sash cord). Just pull the window down as far as it will go and let it hang. It should stay in place because there are weights, which are hidden inside the wall, and attached to the window with rope.
Clean all wooden areas of the sash with warm, soapy water and a large sponge. Be sure to clean on top of the windows too.
Scrape any loose paint from the interior side of the window with a paint scraper or putty knife. Then sand–if bare wood is present cover the bare wood with a primer.
Do the same for the outside of the window, but you will also have to check the glazing that holds the panes in place for cracks and missing pieces. Always replace old glazing compound with new (when necessary), but you can use caulk to fill any cracks in the wood. Sometimes the top sash is also hung with ropes and weights, in which case you can lower it a little bit (one foot should be enough). If the top sash is firmly attached to the window jamb, then it is best to leave it in place. Just add caulk to any place that is not tightly sealed.
Paint the windows. Use 1 1/2-inch and 3-inch trim brushes and try to leave as few brush strokes as possible. Cover every little bit of sash wood and glazing that lies next to the glass completely. If the windows are new they will need two coats, with the first being a primer-sealer.
Let the windows dry completely before putting them back in place.
Reattach the window stop next to the bottom window, so that it slides up and down without any problem or interference.
Scrape all paint from the glass with a razor blade scraper.