Use the hammer and pry bar to gently remove the thin strip of stop-trim that borders the interior side of the old windows, trapping them inside. (It's usually 1-by-2-inch trim.) Don’t break it as you take it out. Remove the nails from the trim with the hammer, and set the trim aside.
Remove the old windows. Leave in place the stop-trim that's around the exterior of the opening.
Install the new window unit according to the instructions, shimming it level and securing it with mounting screws in the sides. The exterior stop-trim will prevent it from falling out through the opening.
Reset your interior stop-trim so that it sits directly against the new window unit, trapping it in place. Use your trim nailer to sink nails through the surface of the stop-trim and into the surrounding wall, about one nail per foot.
Use the caulking gun to run beads of caulk along the joint where the trim meets the new window, and along the line where the trim meets the wall.