We live in a galaxy that is called the Milky Way. It’s called a barred spiral galaxy, which means that it has a spiral shape with a bar of stars across its middle. The galaxy is rather huge — at least 100,000 light-years in diameter, making it the second-biggest in our Local Group of galaxies.

More mind-blowing is that this mass of stars, gas, planets and other objects are all spinning. Just like a pinwheel. It’s spinning at 270 kilometers per second (168 miles per second) and takes about 200 million years to complete one rotation, according to the National Radio Astronomy Observatory. But why? More details below.

It’s worth taking a quick detour to talk about how long it takes the Solar System to move around the center of the galaxy. According to National Geographic, that’s about 225 million years. Dinosaurs were starting to arise the last time we were in the position we are today.

Scientists have mapped the spin using the Very Large Baseline Array, a set of radio telescopes. They examined spots where stars were forming and paid particular attention to those areas where gas molecules enhance radio emission, according to the National Radio Astronomy Observatory. Dubbed “cosmic masers”, these areas shine brightly in radio waves.

As Earth moves in its orbit, the shift of these molecules can be mapped against more distant objects. Measuring this shift shows how the entire galaxy rotates — and can even provide information about the mass of the Milky Way. So that’s all very neat, but why is it rotating in the first place?

If we think back to the early Universe, there are two big assumptions astronomers make, according to How Stuff Works: there was a lot of hydrogen and helium, with some parts denser than other areas. In the denser areas, gas clumped together in protogalactic clouds; the thickest areas collapsed into stars.

“These stars burned out quickly and became globular clusters, but gravity continued to collapse the clouds,” How Stuff Works wrote. “As the clouds collapsed, they formed rotating disks. The rotating disks attracted more gas and dust with gravity and formed galactic disks. Inside the galactic disk, new stars formed. What remained on the outskirts of the original cloud were globular clusters and the halo composed of gas, dust and dark matter.”

A simpler way to think about this is if you’re creating a pizza by tossing a ball of dough into the air. The spin of the dough creates a flat disc — just like what you observe in more complicated form in the Milky Way, not to mention other galaxies.

For more on the Milky Way, visit the rest of our section here in the Guide to Space or listen to Astronomy Cast: Episode 99.