Window sashes operate by traveling up and down on tracks. When there are changes in temperature and humidity, the sashes can warp. If your window is merely painted shut, or jut experiencing too much humidity, this fix should only take a few minutes. If the frame and sashes are warped and out of square because the house has settled, well...you just might need a new window.
The sash may be sticking because it is painted shut, either from the inside or the outside. Take a utility knife with a new, sharp blade and carefully score the seam between the sash and frame. If the sash still won't operate, go on to step 2.
From the inside of the house, wedge the flexible blade of a putty knife between the sash and the frame. Use the hammer to lightly tap the knife blade around the entire perimeter of the frame and sash.
If this still doesn't free the sash, you may have to attack the problem from the windows exterior. Assuming the window is accessible and not four stories up, gently wedge a pry bar under the sill along the corner of the window. You may need to tap it with the hammer to get it in place. Stick the block of wood under the pry bar so you don't mar the sill. Using the leverage of the pry bar, try lifting the sash—working it evenly from one corner to the other to prevet damaging the window.
With luck, the window is now open and you can examine the tracks. There may be paint buildup or burrs (rough areas on the metal). If that's the case, lightly sand the area and apply paraffi or beeswax to keep things moving smoothly.