Depends how extensive it is, if it's squashy in the middle but not at the edges you can use wood filler, scrape out the rotten bits and then use wood filler, then repaint it. DON'T cut out the bad part yourselves, well unless you are good at reglazing.
Also, if you have rot in your frames, it's worth checking the putty which is holding the glass in for holes that will let moisture in and trap it in the wood. Reputtying your windows is a dull but satisfying job which makes a difference to the integrity of the frames.
Ooh, my DH would know what to say to this! He has been systematically restoring all the wooden windows in our 1930's semi. All had various degrees of rot, and we could in no way afford to replace.
I don't know what he used, but the process involved digging out of all of the rotted wood, sanding down, filling with some kind of wood filler (assume your local DIY will know which one is good for outdoors), drying, sanding again, painting with some kind of primer, then undercoat, then gloss.
It's a bit of a process, so you probably need to move fast to catch the last available days of sunshine. My DH has been working on our windows over two summers. He's still not finished...poor sod