(Note: Some of the technical details in this discussion have not been translated into easily understandable text as well as I would like. Almost everything other than the details of the helium ionization and recombination is correct, and even those are more accurate than not; but until this note is removed readers should not rely on those details for critical discussion.)
All stars have variations in temperature, density and brightness, but for most stars, such as the Sun, these variations are very small. In some stars, however, such as Cepheid variables (named after δ (delta) Cephei), the variations are large and easily noticeable.
Variation in brightness and size of a typical Cepheid variable
(Diagram (slightly modified) from European Space Agency Science and Technology Educational Support)
As shown above Cepheids pulsate in a regular way, rapidly increasing in brightness as they increase in size, then slowly decreasing in brightness as they decrease in size. The reason for this pulsation is that slight instabilities in temperature and density are exaggerated by changes in the structure of helium atoms in a layer below the surface of the Cepheid.
For stars to be stable heat must flow from layer to layer at a constant rate, equal to the energy production in the core and the loss of heat at the surface. This requires a particular balance between temperature, density and opacity (which depends upon the temperature, density and composition of the gas) in a given region, and in the layers above and below that region. If, for example, a region is too low in density to effectively block the flow of radiation, so that heat flows through the region faster than it can be replaced, the region will cool and contract, causing an increase in its density which allows it to more effectively block the outward flow of radiation, just as it "should have" in the first place. Conversely, if a region has too high a density and opacity and heat cannot pass through the region fast enough, the gas in that region will heat and expand, causing a decrease in its density which allows the heat to escape more easily.
Fluctuations in density of this sort cause vibrations similar to sound waves to pass through stars (these are the fluctuations studied in helioseismology), but they do not usually produce substantial changes in the star's structure, because any variation from a stable structure is kept small by a continual adjustment of density and temperature. Sometimes, however, things can become unbalanced, and the fluctuations become much larger. That is what happens in Cepheid variables.
Cepheids are relatively massive, young stars which are in the last stages of their life (being massive they don't last very long, so they can be young and still be in the last stages of their life), and passing through a yellow-giant stage. When the surface temperature is in a temperature range similar to that of the Sun, there is a region not far below the surface where helium ions which only have one electron are close to the temperature (about forty thousand Kelvins) at which they lose their second electron as well.
Let's suppose that in the region where temperatures are slightly above the double ionization temperature, some fluctuation in conditions causes temperatures to become a little too high, so that the gas ought to expand and cool off. The outer layers of the star start to expand and cool as energy stored in the kinetic energy of the gas (its temperature) is transformed into gravitational potential energy (the star gets larger). Under normal circumstances, as the star expands the temperature continually drops; but in Cepheids, as the temperature in the region where helium is doubly ionized reaches the double ionization temperature, the temperature stops going down, even though the star continues to get larger. Heat is still being converted into gravitational potential energy, but temperature stops dropping because the recombination of electrons with the doubly ionized helium atoms releases large amounts of energy and keeps the temperature at a constant value. (A similar thing happens on the Earth in thunderstorms. As warm, moist air rises it expands and cools, but when it reaches the condensation temperature at which water vapor condenses to microscopic droplets of liquid water, large amounts of heat are released which keep the temperature from dropping any further, while continuing to drive the vertical motion of the gases. Without that heat source, thunderstorms would be far less powerful.)
The expansion continues without any change in temperature in the region where helium is recombining, until all the helium has recombined; but by then the star is much larger and brighter than it was, and in fact much larger and brighter than it ought to be, so it starts to cool and to contract to its former size. Everything now runs in reverse, with gravitational potential energy being converted into kinetic energy as the star gets smaller and hotter; but just as before, when the temperature reaches the double ionization temperature, things get "stuck" as the singly ionized helium ions lose their remaining electron, and gravitational energy which ought to go into heating up the gas is used to ionize the atoms instead.
In other words, the ionization of helium prevents the temperature from rising until all the helium is doubly ionized while the star contracts, while the recombination of the ions prevents the temperature from dropping until all the helium is singly ionized while the star expands. The transfer of heat to ionization during contraction pushes the star to too small a size, while the transfer of heat from recombination during expansion pushes the star to too large a size, in the same way that pushing a swing one way or the other produces a much larger swing than if the swing is not given any extra push.
The Period-Luminosity Relationship
Since the mechanism which causes Cepheids to expand and contract requires that a particular region just below the surface of the star has a specific temperature, it is reasonable that all Cepheids have about the same surface temperature, as well. But for stars of a given temperature the brightness per square foot is about the same, so larger Cepheids must be brighter and smaller ones fainter. But it takes time for the fluctuation in brightness and size to occur, and the bigger the star is, and the bigger the distance that it covers as it expands and contracts, the longer the time it takes for that fluctuation to take place (this is similar to the fact that long pendulums take longer to swing back and forth than shorter ones do), with the interesting and important result that Cepheids which are larger and brighter take longer to pulsate, and Cepheids which are smaller and fainter take less time to pulsate.
Light curve for SU Cassiopeiae
(Diagrams also (modified) from European Space Agency Science and Technology Educational Support)
Light curve for SV Vulpeculae
In the light curves shown above the apparent magnitude of each star is plotted vertically, while time expressed as the phase of the variation in magnitude is plotted horizontally. Phase = 0 or 1 represents times at which the Cepheid is at maximum brightness. Phase = .5 or 1.5 represents times halfway between maxima. The curves don't look exactly the same, SV Vulpeculae having a more rapid rise in brightness in comparison to its decline, than SU Cassiopeiae; but the most important difference is that SV Vulpeculae has a period of 44.96 days, while SU Cassiopeiae only has a period of 1.95 days. The difference in the period corresponds to a difference in size and brightness of about a factor of 10. That is, SV Vul has about 3 times the diameter, 10 times the surface area, and 10 times the brightness of SU Cas, and being larger and brighter, takes longer to expand and contract than the smaller, fainter star.
Still to be added: Diagram and discussion of period-luminosity relationship for Cepheids