Thrush can be caused by bacteria or yeast. The best way to prevent thrush is to pick the feet daily and feed a forage based diet with little to no sweet feeds, grains, or other high starch horse feeds.
To treat thrush, I fill a spray bottle with hydrogen peroxide. I spray the whole bottom of the hoof every other day and stand the horse on concrete or asphalt until it's dry. Once it's dry, I put on Vick's Vapor Rub (will kill yeast and some bacteria). After the trush is gone, I'll just spray the bottoms of their feed with peroxide every so often, if they look damp or "mushy".
Feeding Apple Cider Vinegar is also a good way to prevent thrush in horses that are prone to it. ACV changes the PH of the horse's skin and hooves, so bacteria, yeast, and flies are less likely to find it appealing
. Add 1/2 to 1 cup in their feed or water daily.