"Trimming out" a window generally means installing wood moulding on all four sides, with the ends meeting in mitred cuts to form the corners. If there's a sill on the window, you have to adjust that design. There are many ways to trim a window sill, with one of the easiest being to butt the bottom of the vertical trim against the sill top on either side of the opening. Make sure your trim isn't wider than the overhang of the sill on both sides, as the trim has to sit entirely on the sill's overhang.
Measure horizontally across the top of the window casing with your measuring tape.
Mark the measurement on a piece of trim, putting two marks on the trim, with several inches of space beyond both. Set the trim on the mitre saw, face up, with the bottom side running along the back fence of the saw and one of the marks under the blade. Turn the blade to 45 degrees outward (away from the measured section) and make the cut.
Move the other mark under the blade, turn the blade to 45 degrees in the opposite direction, and make the cut.
Hold the piece along the top edge of the window opening, with the bottom of the trim right at the edge and the two mitre cuts angling out from the two corners. Nail it in place by shooting in trim nails every foot along the top and bottom edges of the piece with your nail gun.
Follow the same procedure to measure and cut the two vertical side pieces of trim, except measure from the top corner to the top of the sill (instead of to the oppose corner), and mitre only the end that's going in the top corner on each side. Cut the bottom ends straight across (at 90 degrees on the saw).
Install the two vertical side pieces with the nail gun, fitting the mitred top ends against the mitre cuts at the ends of the horizontal piece, to form the two upper corners. The straight-cut bottom ends of the two vertical pieces should rest right on the sill.
Caulk all around the edges of the trim, where it meets the wall, the window casing and the sill.