When galaxies collide/join.

What is the effect on the planets that are associated with the various stars.
What may happen to the stars themselves?
After all they are separated by distances of light years magnitude.
Does it all become like a giant solar system where planets fly off like asteroids?
What is known about this phenomena to date?
Cheers