In this demonstration, we used fiberglass mesh.
Once you've removed the screen frame from the window, lay the frame on a flat surface and roll out enough replacement screen that it covers the entire frame. Make a cut across the roll with sufficient excess to clamp around the edges of the frame while you work.
The screen is held in the frame by a plastic spline that runs along a channel around the perimeter of the frame. Use a nail-punch or other sharp object to loosen the end of the spline and pull it up from the channel and out of the frame. The screen should come out easily once you've removed the spline. It may be helpful to wash the screen frame before continuing, or you can use compressed air to blast out any dirt.
When laying the new screen over the frame, lay it out with the curved or concave side down. This will make it easier to install the screen and ensure that the new piece lies flat in the frame. You can then use clamps to hold the screen taut onto the frame while you work.
It's advisable in most cases to replace the spline along with the screen material. Spline is inexpensive and can be purchased at most home stores (Image 1).
Once you've creased the screen all the way around the frame, begin placing the spline in the channel. Start on one side and use your fingers to push the spline into the channel from one side of the screen to the other (Image 2). Try to install the material so that it is neat and flat, but don't worry about getting the screen overly tight.
Unspool a length of spline and install it by pressing it into the frame's groove using a rolling spline-tool (Image 1). Gently pull the spline tight with one hand as you carefully press it into the groove with the roller (Image 2). As the spline goes into the groove, it helps pull the screen taut.
When you reach the corners of the frame where the roller won't reach, use a flat-head screwdriver to press the spline into the corner. Always work in the same direction with the roller -- don't back the wheel up. Be careful not to allow the roller to slip out of the groove as it could damage the screen mesh.
When you have installed spline all the way around the frame and come back to the starting point, trim the spline to length using a utility knife. Also use the utility knife to trim off the excess screen mesh from the outside of the frame. Allow the blade to ride along the outside of the frame's groove to ensure a straight, clean cut.