Original pine should be repaired rather than replaced; old pine is usually stronger and will still have a longer life than most modern pine.
Worn, rotten or damaged wood can be filled or cut out and replaced with a Dutchman repair.
Internal pine can be filled with a standard decorators filler, but external pine, such as is found in window frames is best filled with a two-part epoxy filler.