There are two privileged lines in the sky. One is the familiar ecliptic, the path traveled by the Sun. It is the image of our orbit around the central star, as seen from the Earth, against the stars. The Moon travels not far from this path and it even occasionally eclipses the Sun, and sometimes the Earth's shadow falls on the Moon. Likewise, the main planets stay fairly close to this line in the sky. We see that the orbits of the planets tend to lie in the same plane and this plane is close to that of Earth's orbit.
The other privileged line is the one centered on the Milky Way. While the name of the first line ("ecliptic") suggests a function (the line where eclipses occur), the name "Milky Way" suggests nothing useful other than general milky appearance (the name is derived from a Greek fairy tale involving a goddess and her milk). After telescopes became commonplace, following the efforts of Galileo, it was soon realized that the Milky Way is an unusually dense collection of stars, all lined up. Where it is dark, it was found, dust clouds block the light of stars behind. In essence, we are looking at the main plane of an enormous aggregation of stars, and we are right in the middle of it.
The realization that we live inside a galaxy and that there are other galaxies besides ours came in stages. It all started with the observation of fuzzy spiral objects which were grouped with other such "nebulae" and with star clusters as interesting curiosities in the sky, not to be confused with really interesting things such as comets. In western tradition, toward the end of the 18th century, the German philosopher Immanuel Kant (1724-1804), who had earlier proposed that the solar system arose from a disk of rotating dust and gas, suggested that the Milky Way is one of many "island universes", that is, that some of the "nebulae" seen in telescopes may be galaxies themselves.
His younger contemporary, the astronomer William Herschel (1738-1822) systematically measured the proper motion of stars in the sky. He found that stars were moving apart in one region and coming closer together in another, and concluded that the Sun was moving toward the region where stars are moving apart. Apparently, the Sun is not the Center of the Universe, but has its own proper motion. This opened the question about where the center of the universe really is. As telescopes improved, it emerged that certain nebulae have a spiral shape. Thus, after the middle of the 19th century the idea was floated, more than once, that the Milky Way itself might be a spiral nebula. For this idea to be evaluated, one had to know the position of the Sun and the dimensions of the home galaxy.
In 1918, the American astronomer Harlow Shapley (1885-1972) showed that the Sun is well off center of our home galaxy, by some 30,000 light years. He used a certain type of variable star (with known luminosity) to estimate distances from the differing brightness of these stars in various parts of the heavens. Shortly after, Edwin Powell Hubble (1889-1953) demonstrated that most "nebulae" are objects outside our galaxy, using the 100-inch telescope at Mt. Wilson (in 1924). With this powerful instrument, he was able to apply the distance-from-variable-star method to the Andromeda nebula itself, observing stars within that neighboring galaxy. Thus, the enormous distance to this neighbor became clear: Hubble gave it almost a million light years. As it turned out, this was still quite a bit short of the truth. The distance is greater than 1.5 million light years. With this greater distance, the information coming in from the Andromeda could be interpreted correctly, and it turned out to be a sister galaxy, quite similar to our own.
The Andromeda Galaxy, M31. With the Milky Way, the largest members of the Local Group of galaxies. Our own galaxy is thought to be a large spiral similar in apperance to M31. (The 31st object in the Messier catalog.) (Source: NASA)