Galaxies can interact, collide, and even merge together. In fact, astronomers are now finding evidence that collisions among galaxies may dominate their evolution! It is not so surprising that this should be so. We know that the average separation between galaxies (in a cluster) is only about 20 times their diameter. We also know that galaxies are moving and that they tend to be found in clusters (groups of galaxies). All of these facts make galactic interactions likely.
Mergers are the most violent of the interactions. These occur when two galaxies collide and find they do not have enough momentum to keep going after the collision. Instead, they fall back into each other and eventually merge together, forming one galaxy in place of the original two. If one of the colliding galaxies is much larger than the other, it will remain largely intact after the merger; that is, the larger galaxy will look much the same while the smaller galaxy will be stripped apart and become part of the larger galaxy. This is called Galactic Cannabalism. Collisions are less violent than mergers in that both galaxies remain separate after the collisions. Interactions are the least violent of all. Here, the galaxies do not actually collide; they simply become distorted or exchange gas and dust as a result of their mutual graviational attraction. In the picture above, it appears that the two galaxies in the center are colliding, and a third galaxy (in the upper left) is interacting with the other two. (The galaxy in the bottom left is not actually part of the group - it just happened to be in the same direction.)
Even when two galaxies pass right through one another, their stars never collide. Stars are very small and widely spaced in galaxies. It is extremely rare for them to ever come close enough to interact, even when the galaxies they are a part of are colliding. On the other hand, the large galactic gas and dust clouds interact (due to gravity) as their galaxies collide. Even if the galaxies do not actually collide, the gas and dust from one galaxy may be stripped away by the other in a galactic interaction. Many people believe the Magellanic stream (a streak of gas and dust streching from our galaxy toward the Small Magellanic Cloud (SMC)) formed when the SMC passed near to the plane of our galaxy and was stripped away by the gravitational pull of the Milky Way. The collisions and compression of the gas clouds as a results of these interactions can trigger rapid star formation. Thus, bursts of star formation and the presence of galaxies stripped of gas and dust are sure signs that a galactic interaction has taken place.
Gravity is the force that makes galaxies interact, collide, and merge. Colliding galaxies are twisted and deformed by their mutual gravitational fields. This often gives galaxies peculiar shapes and can create "tails" and "bridges" between the interacting galaxies. These features are simply the patterns of the gas and dust which have been drawn out by tidal forces during the interaction.
A close-up of a galactic collision.