Explain the process of flashing windows to prevent water infiltration and ensure proper drainage.
Flashing is a material used to seal the gaps between the window frame and the wall, preventing water infiltration. It is typically installed around the perimeter of the window, underneath the siding, and extends outward to drain water away from the window. Flashing can be made from various materials, such as metal, plastic, or selfadhering membranes.