In a manner of speaking, virtually all stars are variable; their values change throughout their lives according to the patterns and influences of their components and environments. The Sun, for example, has a variable magnetic field that operates on an 11-year cycle. However, most variables that we refer to as such are those which vary in brightness, as seen from Earth, in a regular pattern. Cepheid variables, specifically, have a few key qualities;
- They are more massive than the sun
- Their brightness varies according to a predictable schedule from about 1 to 50 days
- They have a significant difference between their brightest and dimmest phases
- They are giants or supergiants who have exhausted the majority of their hydrogen fuel
The exact mechanism for the variation of light is, in principle, fairly simple, but requires a more in-depth understanding of stellar evolution in order to understand it completely. As you probably know, stars convert hydrogen into helium during their main phase. When a significant amount of the hydrogen has been fused, the stars enter the later phases of their lives, and begin to fuse the helium into heavier elements. Fusion itself is not simply a matter of the star being hot enough; the pressure and density of the compressed gasses are inversely related to the temperature. Consider the perfect gas equation PV = nRT: as pressure or volume increase, temperature decreases. If a star heats up, we would expect its volume to increase, and if it cools, it should contract (per the perfect gas law). However, the perfect gas law does not account for gravity; all of that gas is constantly subjected to the contracting force of gravity.
The properties of the elements that compose the star can also alter its physical appearance. Hydrogen atoms are not particularly opaque, but helium ions are; the proposed explanation for Cepheid variables lies in this fact, according to a principle called the Kappa mechanism (see reference below). Per this mechanism, the helium ions in the outer layers of these degenerate stars are opaque, and thus they absorb a significant amount of the energy from the star, making them even more opaque. This forms a sort of "radiation dam" which artificially dims the star. However, the increasing energy causes an increase in pressure, which eventually forces its way past the dam, causing the star to expand, and brighten. Eventually, built-up energy dissapates, and the gravitational forces take over, condensing and dimming the star again.
This sudden expansion and gradual contraction is born out in the "shark-fin" luminosity graphs of Cepheids; they depict a sharp spike in luminosity corresponding to the "dam" breaking, and a gradual decrease corresponding to the gravitational contraction.