Wash the dog with DAWN dish soap, allow them to fully dry before applying any topical treatment. My dogs had many different treatments over the years, Revolution and Advantage edibles for heartworm/flea and tick worked the best. No doggies now though.
Treat the yard as well, and follow directions.