The two most important variable stars showing this very regular, periodic
variability are known as RR Lyrae stars and Cepheids .
These stars truly do pulsate, expanding and contracting with a
rythmic beat. Here is an animation.
It was determined early in the 20th century by Henrietta Leavitt that some stars
varied in luminosity, and this change in luminosity had a specific repeating
period.
But the final VERY important piece of information: The Period of this
Luminosity change was related to their Luminosity. Very bright variable
stars oscillated in brightness very slowly, while the dimmer variable
stars oscillated in brightness very quickly, as shown below.
Period-Luminosity Relation for Variable Stars
Shapley was aware of Henrietta Leavitt's work on characterizing
Variable Stars, and was able to obtain distances for a few.
This allowed him to calibrate the system, making all variable
stars useful for distance determinations.