The analogy of an expanding universe. X and Y arrows are the visual representations of a flat space and T arrow follow the forward timeline. As seen, the space is getting bigger with time and the spiral galaxies within gets further apart from each other. (Free Source)
When Einstein finished his seminal paper, he, just like Isaac Newton, believed in the static universe. That is the volume, or space in this universe is neither expanding nor contracting. He believed that the size of the universe is as it is throughout its existence. Strangely, his formulations in General Relativity predicts that the universe should be either expanding or contracting. Hence, he introduced a modification to his original paper called the cosmological constant to keep the universe static.
A ground breaking discovery was made in 1929 by a prominent American astronomer, Edwin Hubble. Using a powerful telescope, he discovered that there are other galaxies, which are huge collections of stars outside of our massive Milky Way galaxy and what is strange is that these small specks of light emitting from stars very far away appear to be moving away from us! No matter which part of the sky we look at, all the distant galaxies appear to be moving away from our view. This could only mean one thing – the space between the galaxies is getting larger making the galaxies further apart from each other. One way of viewing this is by marking ink dots on a deflated balloon. When you blow air into the balloon, the surface expands causing the distance between the dots to increase. The ink dots represents the stars and this is the analogy of stars moving away from each other due to the expanding universe.
"[If the redshifts are a Doppler shift] … the observations as they stand lead to the anomaly of a closed universe, curiously small and dense, and, it may be added, suspiciously young. On the other hand, if redshifts are not Doppler effects, these anomalies disappear and the region observed appears as a small, homogeneous, but insignificant portion of a universe extended indefinitely both in space and time." - Hubble, Edwin, Monthly Notices of the Royal Astronomical Society, Vol. 97, p.506,The SAO/NASA Astrophysics Data System
Obviously mistaken, Einstein called the Cosmological Constant his biggest blunder and accepted the fact that the universe is expanding after this groundbreaking discovery. Seeing that the universe is expanding has another implication, which means the universe was a much smaller place in the past. Using precise measurements, scientist are able to compute how much time it was when the universe back then was infinitely small, infinitely dense and infinitely hot – a universe smaller than the size of an atom containing everything we see, touch and sense, in a history about 13.4 billion years ago.