Remove the window trim, if it exists, on the interior of the shed window. Buildings that have not been finished on the interior usually do not have interior window trim.
Remove the exterior trim around the window. Use a flat pry bar to work the trim boards loose. Set the trim boards aside for possible reuse.
Remove the window sashes. These are the framed glass panes within the window frame. Commonly this involves removing the window jambs or frame pieces that hold the sashes in place. Handle the sashes carefully to avoid broken glass.
Pry the window frame from the wall opening. Work the trim loose of the trim nails driven through the frame into the wall studs. The nails may pull through the trim and can be removed from the stud later. Clear away any shims or wedges used around the old window.
Place the new window in the window opening. Place shims, thin pieces of wood used to fill gaps, between the window frame and stud walls to create a solid fit. Check the level of the window frame using a short carpenter's level. Adjust the level using shims or small wedges of wood if necessary.
Nail the window in place using 3-inch finishing nails. Alternatively, use 3-inch deck screws to attach the window frame to the stud walls.
Replace the exterior trim using the boards salvaged in Step 2 if possible. Alternatively, replace the trim with new boards cut to size. Nail the trim in place with 2-inch finishing nails.