The inner part of the galaxy rotates somewhat like a solid wheel, and the arms trail behind. But almost all spiral galaxies are much older than 2 billion years. According to one proposed solution to the mystery, differences in gravitational force throughout the galaxy push and pull at the stars, dust, and gas. This activity produces waves of compression. Because the galaxy is rotating, the waves seem to travel in a spiral path, leading to the appearance of spiral arms of dense dust and gas.
Stars then form in the arms.
Kenneth Brecher, Ph.D., Professor of Astronomy and Physics, Boston University. How to cite this article.