Galaxy collisions are quite common and are believed to be one of the main factors driving cosmic evolution. In fact, most galaxies have probably been involved in several collisions since their initial formation. These collisions take hundreds of millions of years to complete, making it impossible to observe a collision from start to finish. Instead, astronomers run computer simulations of galaxies merging and browse the skies for scenes that are consistent with the images from their simulations.
While it is true that a galaxy may contain as many as 100 billion stars, a collision between galaxies does not necessarily mean countless star collisions. The reason for this is that the stars are very far apart. The likelihood of a collision between stars in colliding galaxies is extremely insignificant. If two galaxies that were made only of stars were to collide, they would most likely pass between each other with no change to either system. However, the dust and gases that occupy the space between stars produce a different effect.
Collisions between galaxies are inelastic. This is because the kinetic energy of the galaxies is not conserved. Ordinary collisions are known as elastic collisions because the kinetic energy of the colliding objects is conserved, and they move apart. In an inelastic collision, the colliding bodies merge to form a single system. A collision between galaxies results in the formation of a new galaxy, and the gravitational interaction of dust and gases that occupy the empty space between the stars forms clumps of matter. As the process continues, these clumps become so massive that they eventually collapse under their own gravity. This is called gravitational collapse, and it is how new stars are formed. Newly formed stars tend to shine very brightly for the first few million years of their life-cycles, so a concentration of highly luminous stars indicates that a collision has occurred.
There is one more possible effect of galaxy collisions, and that is the effect of the interaction between supermassive black holes. Supermassive black holes are simply black holes that have masses ranging from hundreds of thousands to billions of times the mass of the sun. There is evidence to suggest that a supermassive black hole occupies the center of every galaxy. Computer simulationsof collisions between supermassive black holes show that one of them is propelled a great distance away from the newly formed galaxy at a very high velocity and never returns, while the other receives a tremendous burst of energy. This energy is then transferred to the disk of gas and dust that revolves around the black hole, known as the accretion disk, where it will glow with a soft flare of x-rays for thousands of years after the collision.
When galaxies collide, they do not annihilate each other as matter-antimatter collisions do. Instead, the colliding galaxies merge to form a new galaxy with new stars. Because the newly formed galaxy will be larger than either of the originals, solar systems are simply pushed outward from the center. There is no evidence to suggest that galaxy mergers have any adverse or destructive effect on planets. Evidence shows that the Milky Way Galaxy will collide with the Andromeda Galaxy in 4 billion years. The collision will do nothing more than paint the sky with a dazzling new array of stars.