Not the old kind of flagella
Even though some eukaryote cells have flagella that look like the ones in prokaryote cells, they don’t work the same way. One did not evolve from the other.
What makes eukaryote flagella move?
Eukaryote flagella probably evolved from a cell part called the spindle, used during reproduction. Even though both kinds of flagella are made of protein, the eukaryote ones are powered by small sugar molecules made in the cell’s mitochondria, not by protons.
What does the flagellum do?
Most eukaryotes are one-celled creatures, and they use their flagella and ciliae to move themselves around in the water to find food. But some eukaryotes are part of multi-celled creatures.
You might think they wouldn’t need to move around anymore. But actually a lot of multi-cell eukaryote cells do still use their flagella or their ciliae.
Flagella inside your body
For instance, there are lots of ciliae on cells inside your trachea (your windpipe, that you breathe through). These cells don’t move themselves, but they use their ciliae to push bits of dust or smoke or food out of your windpipe so it doesn’t get clogged up.
Sperm cells and flagella
Another example is that sperm cells are eukaryote cells with flagella, and they use their flagella to swim over to the egg so that multi-cellular creatures from hydras to humans can reproduce.
How prokaryote cells move around
Bibliography and further reading about flagella: