Galaxies sometimes collide (pic related). Our own galaxy is predicted to collide with another galaxy (Andromeda), about 4.5 billion years from now. When that collision happens, our solar system could be flung out of both galaxies.
https://en.wikipedia.org/wiki/Andromeda%E2%80%93Milky_Way_collision