If your window frame (the jambs and sill) is in bad condition or if you want to change the size of your window, you will need to remove the old window. Chances are you will also end up modifying the siding and changing the wall framing.
Unless you don't mind being windowless for a long period, plan the job so you can start framing and installing the new window right away. You can measure for the new window while the old one is in place. Order and inspect the new window before you remove the old.
You can remove the sashes first, then dismantle the frame; this is the best solution for a second- or third-story window. These pages show how to remove the window with the sashes in place.
Prestart Checklist
Time
About 2 hours to remove a window
Tools
Hammer, flat pry bar, drill with screwdriver bit, utility knife, slip-joint pliers, reciprocating saw, handsaw
Skills
Basic carpentry skills
Prep
Place drop cloths on the floor and seal off the room's doors with plastic. Place a tarp or sheets of plywood outside the window to protect the lawn and plants.