Measure the opening for the window (with the existing window still there), getting the dimension of the inner edges of the height and width. Move the sashes of the old window as needed to get to the edges with the tape measure. Order the replacement windows with that height-by-width measurement.
Receive the new unit. Remove the trim from the perimeter of the existing window using a pry bar and hammer. Pull the window sashes out of the opening. You will need to re-install the trim, so don't break it.
Set the new window unit in the opening, with the bottom of the unit on the sill. Push the top back up and in so it comes to rest against the trim around the exterior edge. Stand a level alongside the unit and slide shims in around it to get it square.
Drive mounting screws (included with the new window) outward through the screw holes in the sides of the window unit so they grip the surrounding frame.
Fill the spaces around the edges of the window with foam insulation, closing off space. Set the trim back in place around the unit, so it covers the spaces, using trim nails and a hammer to re-install it. Run caulk around the trim to seal it all off.