Galaxies are titanic swarms of tens of millions to trillions of stars, orbiting around their common center of gravity. They also contain interstellar gas and dust. Galaxies show a range of shapes that astronomers group into three basic classes: spiral, elliptical, and irregular.
Spiral galaxies have three visible parts: a thin disk composed of stars, gas, and dust; a central bulge of older stars; and a spherical halo of the oldest stars and massive star clusters.
Elliptical galaxies have smooth, rounded shapes because the orbits of their stars are oriented in all directions. They contain little gas and dust, and no young stars. Like spiral galaxies, elliptical galaxies are surrounded by globular star clusters and dark matter.
Irregular galaxies have a chaotic appearance, and are usually small. Their irregular shapes are probably due to recent disturbances — either bursts of internal star formation, or gravitational encounters with external galaxies.
Our Milky Way is a barred spiral galaxy containing over 100 billion stars. The spiral disk of stars, gas, and dust is about 100,000 light-years across and 2,000 light-years thick — flatter than a pancake. The central bulge of stars is elongated in the shape of a bar.
The Sun orbits within the disk on the trailing edge of a minor spiral arm, about halfway between the galactic center and the visible edge. The Sun takes approximately 220 million years to circle the galaxy, and it has completed about 20 orbits since the solar system was born.
The Milky Way Galaxy resides in a neighborhood of a few dozen galaxies called the Local Group. They range in size from small dwarf galaxies to the large Andromeda Galaxy. Over time, these galaxies interact with one another, changing their motions and shapes. The long-term evolution of a galaxy is influenced by being part of a group. The Milky Way and the Andromeda Galaxy, our nearest spiral neighbor, are headed toward each other. In about five billion years, they may collide and merge. Eventually, our remote descendants could be living in a large elliptical galaxy.