This topical review provides an overview of the key theoretical features of Bose–Einstein condensates (BECs) in cold atomic gases at near zero temperature in the situation where all the bosons occupy at most two single particle states or modes. This situation applies to single-component BECs in double well trap potentials and to two-component BEC in single well trap potentials, such as occur when BEC are used in interferometry experiments. The Hamiltonian is introduced in terms of field operators and mode expansions are restricted to a total of two modes. Spin operators and their eigenstates are introduced as the fundamental basis states for describing the two-mode N boson quantum system. The spin states have a macroscopic angular momentum quantum number of N/2 and the magnetic quantum number k specifies the relative number of bosons in the two modes. The treatment presented involves an extensive use of angular momentum theory, including unitary rotation operators. Important states of the two-mode system such as binomial or coherent states, relative phase eigenstates are discussed. Boson position measurements are specified via quantum correlation functions, and the use of these functions in describing coherence properties, interference patterns and fragmentation effects in BECs is presented. The Bloch vector is defined and related to the quantum correlation functions, with quantum fluctuations of the Bloch vector being treated in terms of the covariance matrix. Applications to important two-mode states are made. Spin squeezing is discussed. Based on applying variational principles, the general dynamical behaviour of the two-mode BEC is determined via generalised Gross–Pitaevskii equations for the modes and matrix mechanics equations for the probability amplitudes of the relative number basis states, the mode and amplitude equations being coupled and self-consistent. The single mode equations are also presented. The Hamiltonian is written in terms of the spin operators and the Josephson Hamiltonian obtained as a simplification in which the dynamical behaviour of the mode functions is ignored – for the one-component case the mode functions are also required to be localised and separate. Coefficients in the Josephson Hamiltonian describe tunneling/intercomponent coupling, asymmetry and collisions and these are defined via integrals involving the mode functions. The Josephson model involves using the Josephson Hamiltonian to give simple predictions of the energy states and dynamical behaviour of the two-mode system, dynamical effects on the mode functions being ignored. The three regimes – Rabi, Josephson and Fock are described, and the energy states obtained for the Fock and Rabi regimes. Dynamical behaviour treatments based on the Josephson model are outlined. In the situation where all bosons are in the same single particle state, semi-classical Bloch equations are derived and their solutions given in terms of elliptic functions. The quantum regime is treated using matrix mechanics equations for the probability amplitudes. Two representative applications of the Josephson model dynamics are treated, with graphs showing the results of numerical work being displayed. The first is in describing Heisenberg limited BEC interferometry for a single-component BEC in a double well, the treatment showing collapses and revivals in the probability distribution for the relative phase. The second treats Ramsey interferometry for a two-component BEC in a single well, the study revealing that oscillations of the Bloch vector collapse and revive, with the Bloch vector's departure from the Bloch sphere during the collapse period revealing that the BEC has fragmented. In both cases collisions cause the dephasing effects that result in the collapse, revival phenomena. The review ends with a brief outline of phase space and other approaches that extend the treatment beyond the two-mode theory, enabling decoherence effects associated with bosons in non-condensate modes to be studied. A summary of the review contents is included. Detailed mathematical derivations are included in several appendices, available as online supplementary material.