You can get an idea of how this works by imagining that the Universe is a giant balloon with galaxies stuck on to it, like this experiment. No matter which galaxy you live in, all the others will get further away as the balloon is blown up.
One of the first astronomers to measure this motion was the astronomer Edwin Hubble in 1929. It is now called Hubble's Law.
The expansion of the Universe is one of the main reasons why astronomers think that the Universe started with a Big Bang.