What happens when galaxies collide?
It is very common for galaxies to collide and interact with other galaxies. In fact, it is now believed that collisions and mergers between galaxies are one of the main elements that drive their evolution in time. Most galaxies probably had interactions with other galaxies since the time they formed.
A galaxy is made of roughly 100 billion stars. So you would think that in a head on collision between two galaxies, there would be countless collisions between those stars, right? The fact is that in such a collision, the probability of two stars colliding is almost 0. This is because even though there are an incredibly large number of stars in the galaxies, the density of stars is not very big since the galaxies are extremely big. In other words, the sizes of the stars are very small compared to the average distance between them. This means that if galaxies were made only of stars, and that two of them would go on a head on collision, they would pass one through another without being much affected!
This is however not what we observe when we look at galaxies interacting. The reason is that the space between stars in galaxies is not empty: it is full of gas and dust. This material will interact when the galaxies collide. It can interact gravitationally, the galaxies can pull on the material in the other galaxies and disrupt their morphologies. There is also friction between the gas in the colliding galaxies, causing shock waves that can trigger some star formation in the galaxies.
These processes can radically affect the galaxies. For example, two spiral galaxies can merge to form an elliptical galaxy.Since galaxies that collide with one another will take millions of years to merge (which is very quick on the astronomical time scale!), we cannot observe their evolution. When we catch two galaxies in the process of merging, we can only get a snapshot of one step in the interaction. In order to produce a series of pictures showing the evolution, we have to observe many pairs of similar galaxies at different points in the history of their merging, and then play a game of putting these images in a time sequence.