Within galaxy clusters, galaxies move relative to other galaxies. They can and do collide. When this happens, the stars generally move past each other, but gas clouds and dust interact, and can form a burst of new stars. Gravity pulls both galaxies into somewhat new shapes, forming bars, rings or tail-like structures.