Most stars are part of galaxies, but some are hurled out of their usual orbits by supernovae, galactic collisions, and black holes. These are the runaway stars, some of the fastest stars known.

High-velocity stars move faster than the stars around them, in some cases much much faster. S5-HVS1 is the king of such stars: it’s travelling at an eye-watering 1,755 km/s, which makes it the fastest star spotted so far.
How did it get so fast? Well, the best theory at the moment is that it used to be part of a binary star system – two stars orbiting each other. Then that system got caught in the black hole in the centre of the Milky Way. One star was swallowed, which shot S5-HVS1 out the other side like a slingshot.
It’s not just black holes, but actual collisions between galaxies that can disrupt the path of stars enough to shoot them out and away. These are sometimes called runaway stars, because some may be moving fast enough to actually escape from their galaxy and (duh) run away. They’re moving fast enough to leave a trail of interstellar gas behind them, as with the four examples pictured above.
And then there’s good old fashioned explosions: a supernova near Orion about 2 million years ago is thought to have sent several stars (AE Aurigae, 53 Arietis, and Mu Columbae) flying in different directions. It also left a giant shockwave in the form of the nebula Barnard’s Loop, which is big enough to be seen with the naked eye (if you’re some place dark).
(An end note: the Wikipedia article distinguishes between runaway stars and high-velocity stars, but the actual difference between the two is not clear to me. S5-HVS1 is classified as both, which suggests there is at least some overlap. If you know more, let me know in the comments please.)