This is a simple question with a rather complex answer. Successful flea control has two aspects. Fleas must be controlled on your dog, and fleas must be controlled in your dog's environment. Since dogs and cats share the same fleas, the presence of a cat in your dog's environment makes flea control much more difficult. To appreciate the complex issue of flea control, you must understand something about the flea's life cycle.
Fleas seem to be rather simple creatures.
Although you are only able to see the adult flea, there are actually 4 stages of the life cycle. They are too small to see without magnification. Fleas lay their eggs on the dog, but the eggs do not stick to the dog's hair. Instead, they fall off into the dog's environment. They hatch into larvae in 1 to 10 days, depending on temperature and humidity.