Because the universe is constantly expanding, the distance between galaxies is always growing.
However, in some cases, the distances between galaxies can shrink if they are gravitationally locked onto one another.
The Milky Way and Andromeda galaxies, for example, are slowly drifting towards one another.
The galaxies are expected to collide in an estimated 4.5 billion years – about the same time our Sun is expected to start dying.
But the vast majority of galaxies in the observable universe appear to be moving away from one another.