Stability theory, also referred to a classification theory, is a means to determine whether the isomorphism types of a given sort of structure can be classified by means of intelligible invariants of the structure. It was largely created by Saharon Shelah.
The basic idea is that for quite general classes of algebraic objects, one can prove what Shelah calls a “structure/nonstructure theorem”: either the isomorphism types are classifiable by a smallish number of invariants, or they are hopelessly wild in some sense, e.g., an arbitrary structure can be encoded set-theoretically in some isomorphism type of the class. An example of the “structure” case is the theory of algebraically closed fields, whose isomorphism types can be classified according to characteristic and transcendence degree. An example of the “nonstructure” case is the family of linear orderings, where a proliferation of complicated linear orders can be constructed by various set-theoretic means.
In very rough outline, stability theory analyzes good (or “stable”) notions of “free amalgams” $M_3 = M_1 \cup_{M_0} M_2$ where $M_0 \subset M_1$, $M_0 \subset M_2$ are substructures. In the “good” (structure) case, it is possible to analyze models by a series of free amalgams of small models, with the series indexed by a well-founded tree. Otherwise, if the class of algebraic objects does not admit a suitably good notion of free amalgam, we have a “bad” (nonstructure) case which permits arbitrarily wild models to be constructed.
(For the time being we are recording some definitions without any effort to motivate them. That should come later.)
For now we will be interested in complete theories? $\mathbf{T}$ over a countable signature. Let $\mathbf{M}$ be a model of $\mathbf{T}$ with underlying set $M$. Let $A \subseteq M$ be a subset, and let $Def_A(M^n)$ be the Boolean algebra of subsets of $M^n$ that are definable by a formula in $\mathbf{T}$ with parameters in $A$.
Recall that an ultrafilter in a Boolean algebra $B$ is the set of elements that get mapped to the top element $1$ under some Boolean algebra homomorphism $\phi: B \to \mathbf{2}$; alternatively, we could define an ultrafilter as such a homomorphism.
The space of complete $n$-types over $A$ is the Stone space $S_n^{\mathbf{M}}(A)$ of ultrafilters in the Boolean algebra $Def_A(M^n)$. Such an ultrafilter is called a complete $n$-type. More generally, an $n$-type is a filter in $Def_A(M^n)$.
Suppose $i: M \to N$ is an elementary embedding from $\mathbf{M}$ to $\mathbf{N}$. Then $i$ induces an isomorphism $S_n^{\mathbf{M}}(A) \cong S_n^{\mathbf{N}}(i(A))$.
It is enough to show $i$ induces an isomorphism $Def_A(M^n) \to Def_A(N^n)$. As a Boolean algebra, $Def_A(M^n)$ is the Boolean quotient of formulas with $n$ free variables $\phi(\bar{x}, \bar{a})$ modulo the equivalence relation $E(\phi, \psi) \coloneqq \phi \Leftrightarrow \psi$ is satisfied in $\mathbf{M}$. By elementary equivalence, $\mathbf{M} \models E(\phi, \psi)(\bar{x}, \bar{a})$ iff $\mathbf{N} \models E(\phi, \psi)(\bar{x}, i(\bar{a}))$, as desired.
A complete type is realized by a point $\bar{a} \in M^n$ if it is of the form
by restricting a principal ultrafilter generated by a point $\bar{a} \in M^n$. Such a type is denoted $tp(\bar{a}/A)$.
For an infinite cardinal $\kappa$, a model $\mathbf{M}$ is called $\kappa$-saturated if for every $A \subseteq M$ with ${|A|} \lt \kappa$, any complete $n$-type is realized in $\mathbf{M}$.
For an infinite cardinal $\kappa$, the theory $\mathbf{T}$ is $\kappa$-stable if for every model $\mathbf{M} \models \mathbf{T}$ and $A \subseteq M$ with ${|A|} = \kappa$, we have ${|S_n^{\mathbf{M}}(A)|} = \kappa$. A structure $\mathbf{M}$ of a countable language is called $\kappa$-stable if the complete theory $Th(\mathbf{M})$ is $\kappa$-stable.
M. Makkai, A survey of basic stability theory, with particular emphasis on orthogonality and regular types, Israel J. Math. 49, n.1-3 (1984), 181-238, doi
John T. Baldwin, Fundamentals of stability theory, Perspectives in Math. Logic, Springer 1988
Gregory L. Cherlin, Review of Fundamentals of stability theory, Bull. AMS, Vol. 20 No. 2 (April 1989), 185-190.