If the rotting is bad enough, you'll need to call a professional to replace the whole windowsill and with damage that extreme, you'll want them to look at the window framing too. But for pockets ...