Even with the presence of dark matter, the stars closer to the center of a galaxy orbit faster than the stars farther away. This raises a bit of a mystery. Many galaxies (including our own) have a spiral shape to them. Since the central stars of a galaxy move faster than stars near the edge, the spiral should gradually twist tighter and tighter until the spiral arms all blended together in a uniform disk.
If that were true, then we would expect to see very few spiral galaxies, and instead see lots of galaxies that look like uniform disks. This isn’t what we see, in fact spiral galaxies are quite common. There must be some mechanism that maintains a galaxy’s spiral shape.
This mechanism turns out to be an effect known as a density wave. We also have such density waves here on Earth. We call them traffic jams. If you’ve ever been in a trafic jam you’ve noticed that while you slowly make your way through it the overall traffic pattern remains the same. Usually when you’re caught in a traffic jam you eventually find the source (construction, minor accident, etc.) but sometimes you enter a traffic jam and go slowly through it without ever seeing a cause. At some time earlier something started it, but now there is just the traffic. The jam itself is now the cause of the jam.
A similar effect occurs with spiral arms in a galaxy. Individual stars are not locked in a particular spiral arm, rather they move around the galactic center passing through one spiral arm after another. But as a star moves toward a spiral arm, that arm’s mass gives it a little gravitational boost to edge them into the arm. When a star begins to leave an arm, the gravitational pull of the arm slows it down just a bit. As a result stars tend to cluster into the traffic jam of spiral arms, and the arm patterns sustain themselves even while individual stars move through them.
You can see this effect in the animation above, taken from Belt of Orion. The density waves of the spiral arms keep their shape, but you can see stars move in and out of them.
So the next time you’re caught in traffic, don’t get frustrated. Take heart in the fact that you are participating in Earth’s rendition of the dance of the stars.