The system NaCl-KCl is used as an example to introduce the reader to a variety of concepts, which form the modern solid solution theory. The chapter starts with the discussion of the chemical stress both end members experience in the process of mixing. This stress is treated as a homogeneous deformation of the end members within the concept of the virtual crystal approximation, VCA. It is shown that the VCA predicts the existence of a positive excess enthalpy in the NaCl-KCl solid solution, but drastically overestimates its magnitude. The inaccuracy of the VCA is attributed to its failure to describe local relaxations. Further, the local relaxations are linked to the effects of intracrystalline reactions of NaNa + KK = 2NaK type, and it is shown that the excess enthalpy can be written as a sum of such interactions acting at various distances within the supercell. The decomposition of the enthalpy of mixing into pairwise interactions is then discussed in the relation to a more general cluster expansion technique, which considers effective interactions from clusters of various sizes and shapes including many-body interactions. Then we argue that a wide range of materials interesting for geosciences can be described within the concept of pairwise interactions only and introduce the supercell expansion method dealing with the effective pairwise interactions. It is then shown that the calculation of the effective pairwise interactions can be performed with different methods. The traditional approach consisting in the calculation of the static energies of a large number of randomly varied structures and solving for the pairwise interactions with the least squares method is compared to a deterministic algorithm, which is based on the consideration of the excess energies of the structures with double defects inserted at all possible pairwise distances within the supercell. This Double Defect Method, DDM, is then applied to the system NaCl-KCl. The effective interactions obtained are used to construct an Ising-type Hamiltonian, from which the temperature dependent mixing enthalpy is evaluated with the Monte Carlo method. Then the temperature-dependent enthalpies are thermodynamically integrated to obtain the free energies of mixing and to construct the temperature-composition diagram. A comparison of the calculated diagram with the experimentally known phase relations shows that a certain thermodynamic effect is missed in the simulations. This effect is identified as the excess vibrational entropy and the DDM calculations are repeated within the quasi-harmonic approximation, which evaluates both the static and the vibrational components of the free energy. These calculations are used to derive the temperature-dependent pairwise interactions, which via the Monte Carlo simulations lead to a much better agreement with the experiment. Finally we discuss applications of the DDM approach to solid solutions with coupled substitution and to multicomponent solutions.