We have analyzed the modulated phase of an Ising model with competing interactions in an effort to increase the understanding of the spatially modulated phases found in many physical systems. The analysis has three stages. First, the mean-field phase diagram is calculated numerically. A large, possibly infinite, number of phases where the periodicity of the ordered structure is commensurate with the lattice is found. The resulting periodicity-versus- temperature curve thus probably has an infinity of steps; i.e., it exhibits "the devil's staircase" behavior. Then the mean-field theory is analyzed analytically, and it is shown that the stability of the commensurate phases can be understood within a domain-wall or "soliton" theory. The solitons from a regular lattice near the transitions to the commensurate phases. The elementary excitations in the solition lattice are the phasons. Third, the effects of temperature-induced fluctuations, ignored in the mean-field theory, are estimated by calculating the entropy contribution to the free energy from the phasons. It is found that the stability ranges of the commensurate phases are reduced, but the staircase survives at finite temperatures. On the basis of our calculations a phase diagram is constructed. © 1980 The American Physical Society.