Remove all the rotten wood, scraping it away with a chisel. Place a trash can nearby to make the cleanup easier. The wood should easily come apart in chunks.
Dry out the rest of the area with a hair dryer. Placing a new board back into a wet environment will recreate the problem. Move the hair dryer back and forth until the area feels dry to the touch.
Measure the space the rotten wood formerly occupied. Write down this measurement.
Cut a new board with a circular saw to fit your measurements. You can also use a handsaw, if you lack a circular saw.
Place the new board into the space, which should be a tight fit. Pound in the wood, if necessary, to fit it into place.
Screw the new wood into place with a cordless screwdriver and wood screws. The screws need to go through the new wood into the framing. Tighten the screws until the heads are flush with the board.