A Dehumidifier won't kill off mold once it's already on the walls or other places of the home and won't get rid of the mold after it's already there.
But a dehumidifier can and will help to prevent future mold growth from happening in your home by getting rid of the excess moisture in the air which is what causes the mold to breed and grow around your home.
Keeping the areas dried out will keep mold from growing but if you already have mold you'll need to physically get rid of it and use the dehumidifier to remove the moisture from the air to keep mold from growing in your home again.