The prevailing theory of the mechanism behind sprial armed galaxies is known as Density Wave Theory. Within a given galaxy there are regions in which the average density is higher than the average density of the galaxy as a whole. As the galaxy rotates these high density areas "slow down" the overall angular velocity of the piece of the galaxy. The rarefied portions of the galaxy rotate at a faster rate than do these high density regions. When these low density regions meet the high density regions the gravitational attraction between stars at different radii is what actually keeps this spiral pattern once the objects have been sufficiently slowed down. For more in depth info check out Lin-Shu Density Wave Theory. This also helped answer the question of how do stars far from the core of a galaxy form. When the gas clouds pass these density waves, they get squeezed and compressed, sometimes enough to initiate thermo-nuclear fusion. Hope that helped.
Joe