Galaxies run into each other all the time, and ours is no exception. The Milky Way and Andromeda are headed toward each other and will meet in several billion years. So what does a collision between two galaxies actually look like?
The surprising part is that the stars almost never hit each other. There’s so much empty space between them that two galaxies with hundreds of billions of stars each can pass right through one another and hardly a single pair will touch. Everything that happens in a galaxy collision happens because of gravity.
In the visualizer, the two galaxies are colored gold and blue so you can follow whose stars end up where. They come in on a near miss. As they swing past each other, each one’s gravity pulls on the other’s disc, harder on the near side than the far side, and that stretches stars out into long curving tails. Sometimes a bridge of stars forms between the two.
They don’t just fly apart after that first pass. They slow down, turn around, and fall back together. On each pass they lose a bit more of their motion, until their centers finally sink into each other and merge into one big galaxy.
The tails don’t disappear when that happens. They keep drifting outward for a long time, and most of those stars will eventually fall back in. Each run picks new angles for the two galaxies, so no two collisions look quite the same.