A double-hung window is a small machine, and its sash hardware is what makes it run. Like any machine it depends on a few specific parts, and when one goes missing, the window stops doing its job. The fix is usually not the window but the hardware, which is why a good original window is worth keeping over a replacement.
The counterweight system is the heart of it. Inside the frame, hidden in the jamb, hang iron sash weights on cords or chains over pulleys, balancing the weight of the sash so a heavy window rises and stays put at any height. When a cord breaks, the weight drops out of reach and the window won't stay open. The sash lock is the visible part, mounted where the two sashes meet: it draws them together, seals the gap against drafts, and secures the window. The sash lift is the smallest piece, the little handle on the bottom rail that gives you something to pull. None of these is complicated, but each is specific, sized and styled to suit the window and the period, and exactly the kind of small part most hardware stores no longer carry.
Salvager's Note: Three parts keep a double-hung window working: the lock (where the sashes meet), the lift (on the bottom rail), and the weights, cords, and pulleys hidden in the jamb. A broken cord, not a bad window, is the usual reason a sash won't stay open.