Galaxies can collide with each other because they are constantly expanding in every direction. Because all galaxies are constantly expanding, it is inevitable that they will collide with each other. Our own galaxy, the Milky Way, is predicted to collide with Andromeda in about 4 billion years.
The stars in each of the galaxies are so far apart though that none of them will likely crash into each other. There are other dwarf galaxies that are currently colliding with the Milky Way but it is happening so slowly and so far away that we are not able to detect any changes.