The wooden part is called the window frame and going by the picture it seems to be a double hung window frame.
There are various types of frame materials (wood, metal, etc.) this site describes the different types of window frames, their pro's and con's and some other handy tips.
Among them whether to replace or repair the window frame:
Some window frames—especially wooden—can be repaired affordably. Still, you should assess the current condition of your window frame and glass before deciding if a repair or a full replacement is necessary. Rotting windows aren’t worth the trouble to repair and often can’t be repaired anyway. Single pane windows create a drafty environment and they aren’t good for insulation or energy efficiency, so if you have single pane windows in need of attention, it’s best to replace them entirely.
If your home’s windows are double paned, you might consider repairing them versus replacing. Wooden windows can be repaired and updated easily with kits and other commercial products sold for the purpose. Older wooden window frames offer a certain charm that you won’t get from windows sold today, so making repairs is an affordable way to save that vintage aesthetic.
If you want to know what the different parts of the frame are called, you can visit this site.
Typically wooden window frames need yearly (or at the very least every couple of years) maintenance in the form of sanding and repainting.
This ensures the wood stays sealed and prevents them from rotting.
I'm not sure what the life expectancy is for wooden frames but 20 years seems a bit short, but if they weren't maintained properly then all bets are off.
Personally if the window is that rotten I'd probably look at replacing it.
By the looks of it, it's single pane glass so it might also be a good idea to upgrade the glass to a multi-pane glass type. Multi-pane glass insulates your house better and helps in keeping noise out (combined with a good window frame of course).