Remove all the rot
First check carefully that there’s no danger from breaking glass while you’re working. Then use a hammer and chisel to remove all the rotten wood.
Make sure you completely remove any remaining smaller rotten areas in the window frame. Clear out the debris and clean the working area thoroughly.
Treating with wood filler
When everything is clean, treat the affected area with wood filler. This acts as both an adhesive and a filler. Sand the area after drying, then apply a finishing layer of filler, allow to dry and sand smooth. After that you can paint the window frame.
Replacing larger sections
If the wood rot has affected a larger area, it’s best to replace a complete section of the window frame. It’s better to remove a bit too much sound wood than to leave some of the rotten wood untreated. Try to make the edges of the opening as straight and square as possible, and then clean the working area thoroughly with a vacuum cleaner or brush.
Make a replacement section
Make a new section in the same shape and out of the same kind of wood to replace the piece you have removed, so that it fits exactly into the opening.
Fit the replacement section with epoxy resin
Coat both parts with undiluted epoxy resin. Let the resin set briefly, and then fit the new section into the opening. Epoxy resin also acts as a filler, so you can use it to fill any gaps between the new section and the window frame.
Sand and paint
When you’ve completed the repair, all that’s left is to sand the working area so that it’s flat and smooth, and then finish the job by painting.