Find and repair the source of moisture. This could be a leaking appliance, like a dishwasher or washing machine. The moisture gives the fungus the ability to flourish in the wood and other materials.
Replace the damaged wood. The rotten wood is no longer capable of supporting the structure. In addition, this removes the majority of the fungus in that area.
Apply fungicide to nearby wood that may be at risk for dry rot. This will kill the fungus and prevent it from spreading.