Measure the window opening while the old windows are still in place, measuring the width and height of the inside tracks where the sashes sit. You will have to move the sashes up and down to access the sides; however, don't remove the old windows until the new ones arrive. Order replacement windows from the height and width measurements.
Remove the trim from around the existing window with a pry bar and hammer, taking it off carefully so it doesn't break. Save it for later. Pull the old window out of the opening. It should come right out once the trim is out of the way.
Place the new window unit on the bottom span of the opening, standing it on its bottom then pushing the top portion in. The exterior trim around the perimeter should prevent it from falling through.
Set a level next to the unit and, if necessary, push wood shims around the perimeter to get it level and plumb. Secure the window unit with the provided screws once it's square. Use a screw gun to shoot the screws through their respective holes in the sides of the unit to grip the surrounding frame.
Fill the spaces around the perimeter of the window unit with spray foam insulation. Reinstall the wood trim over the spaces, securing them with a finish nailer.
Caulk around the perimeter of the window and the trim.